Advertisement
Gutza201

Comanda

Aug 22nd, 2018
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. Las si sursa aici de unde am gasit asta:
  2. https://forum.egaming.ro/topic/156032-respinstutorialsampevent-trivia/
  3.  
  4.  
  5. CMD:an(playerid, params[])
  6. {
  7. if(IsPlayerConnected(playerid))
  8. {
  9. new length = strlen(cmdtext); //28415
  10. while ((idx < length) && (cmdtext[idx] <= ' ')) //28416
  11. {
  12. idx++;
  13. }
  14. new offset = idx;
  15. new result[128];
  16. while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  17. {
  18. result[idx - offset] = cmdtext[idx];
  19. idx++;
  20. }
  21. result[idx - offset] = EOS;
  22. if(!strlen(result))
  23. {
  24. SendClientMessage(playerid, COLOR_GRAD2, "Use: /an [raspuns]");
  25. return 1;
  26. }
  27. if(TriviaQ == -1)
  28. {
  29. SendClientMessage(playerid, COLOR_WHITE, "Nici un event trivia disponibil");
  30. return 1;
  31. }
  32. if( strcmp(result,Raspuns[TriviaQ],true) == 0 )
  33. {
  34. SendClientMessage(playerid, COLOR_WHITE, "Raspuns Bun");
  35. TriviaQ = -1;
  36. }
  37. else
  38. {
  39. //Raspuns Gresit
  40. }
  41. }
  42. return 1;
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement