Guest User

Untitled

a guest
Mar 7th, 2013
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. if(strcmp(cmd, "/bizname", true) == 0)
  2. {
  3. if(IsPlayerConnected(playerid))
  4. {
  5. new bouse = PlayerInfo[playerid][pPbiskey];
  6. if (bouse == 255)
  7. {
  8. SendClientMessage(playerid, COLOR_GRAD2, "Ne posedujete biznis");
  9. return 1;
  10. }
  11. new length = strlen(cmdtext);
  12. while ((idx < length) && (cmdtext[idx] <= ' '))
  13. {
  14. idx++;
  15. }
  16. new offset = idx;
  17. new result[64];
  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, "Koristi: /bizname [Ime]");
  27. }
  28. if (bouse >= 100)
  29. {
  30. strmid(SBizzInfo[bouse-100][sbMessage], result, 0, 64, 255);
  31. format(string, sizeof(string), "Ime biznisa je postavljeno na: %s",SBizzInfo[bouse-100][sbMessage]);
  32. }
  33. else
  34. {
  35. strmid(BizzInfo[bouse][bMessage], result, 0, 64, 255);
  36. format(string, sizeof(string), "Ime biznisa je postavljeno na: %s",BizzInfo[bouse][bMessage]);
  37. }
  38. OnPropUpdate();
  39. SendClientMessage(playerid, COLOR_WHITE, string);
  40. }
  41. return 1;
  42. }
Advertisement
Add Comment
Please, Sign In to add comment