Advertisement
Guest User

Untitled

a guest
Feb 5th, 2014
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. if(strcmp(cmdtext, "/f", true) == 0)
  2. {
  3. if(gTeam[playerid] == 0)
  4. return SendClientMessage(playerid, COLOR_RED, "You are not in a Faction");
  5. GetPlayerName(playerid, sendername, sizeof(sendername));
  6. new length = strlen(cmdtext);
  7. while ((idx < length) && (cmdtext[idx] <= ' ')) idx++;
  8. new offset = idx;
  9. new result[64];
  10. while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  11. {
  12. result[idx - offset] = cmdtext[idx];
  13. idx++;
  14. }
  15. result[idx - offset] = EOS;
  16. if(!strlen(result)) return SendClientMessage(playerid, COLOR_BLUE, "SYNTHAX: /f(action) [message]");
  17. else
  18. {
  19. new string[128];
  20. format(string,sizeof(string), "** (( %s: %s )) **" , sendername, (result));
  21. SendFamilyMessage(gTeam[playerid], COLOR_BLUE, string);
  22. printf("%s", string);
  23. }
  24. return 1;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement