Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. if(strcmp(cmd, "/b", true) == 0)
  2. {
  3. if(IsPlayerConnected(playerid))
  4. {
  5. if(gPlayerLogged[playerid] == 0)
  6. {
  7. SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet !");
  8. return 1;
  9. }
  10. GetPlayerName(playerid, sendername, sizeof(sendername));
  11. new length = strlen(cmdtext);
  12. while ((idx < length) && (cmdtext[idx] <= ' '))
  13. {
  14. idx++;
  15. }
  16. new offset = idx;
  17. new result[96];
  18. while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  19. {
  20. result[idx - offset] = cmdtext[idx];
  21. idx++;
  22. }
  23. result[idx - offset] = EOS;
  24. if(!strlen(result))
  25. {
  26. SendClientMessage(playerid, COLOR_WHITE, "USAGE: /b [local ooc chat]");
  27. return 1;
  28. }
  29. if(PlayerInfo[playerid][pMask] == 1) format(string, sizeof(string), "Stranger: (( %s ))", result);
  30. else format(string, sizeof(string), "%s: (( %s ))", sendername, result);
  31. ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
  32. }
  33. return 1;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement