Advertisement
TayFunCZE

SA-MP Scripting - /setpvar [SIMPLE SCRIPT]

Jun 15th, 2016
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. //Needed includes:
  2. #include <a_samp>
  3. #include <zcmd>
  4. #include <sscanf2>
  5.  
  6. CMD:setpvar(playerid, params[])
  7. {
  8. new targetid, string[64], amount;
  9. if(!sscanf(params, "us[64]i", targetid, string, amount))
  10. {
  11. if(targetid != INVALID_PLAYER_ID)
  12. {
  13. SetPVarInt(targetid,string,amount);
  14. }
  15. else SendClientMessage(playerid,-1,"Bad ID");
  16. }
  17. else SendClientMessage(playerid,-1,"SERVER: /setpvar <playerid> <PVarInt> <amount>");
  18. return 1;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement