Advertisement
Guest User

SETSPAWN WITH CMD

a guest
Feb 26th, 2020
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. CMD:savep(playerid, params[])
  2. {
  3. new file[64], playerb;
  4. format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
  5. if(!dini_Exists(file)) dini_Create(file);
  6. dini_FloatSet(file, "X", PlayerInfo[playerid][pX]);
  7. dini_FloatSet(file, "Y", PlayerInfo[playerid][pY]);
  8. dini_FloatSet(file, "Z", PlayerInfo[playerid][pZ]);
  9. return 1;
  10. }
  11. //^Actually that command will save player X Y Z spawn
  12.  
  13. X=0.000000
  14. Y=0.000000
  15. Z=0.000000
  16. //^But in scriptfiles player, X Y Z float still not change
  17.  
  18. PlayerInfo[playerid][pX] = dini_Float(file, "X");
  19. PlayerInfo[playerid][pY] = dini_Float(file, "Y");
  20. PlayerInfo[playerid][pZ] = dini_Float(file, "Z");
  21. //^This stock loadchar was i make
  22.  
  23. //And this is the revision i make for make sure the CMD working, but nothing happend still 0 X Y Z player in scriptfiles
  24. CMD:savep(playerid, params[])
  25. {
  26. new file[64], playerb, float X, float Y, float Z;
  27. format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
  28. if(!dini_Exists(file)) dini_Create(file);
  29. dini_FloatSet(file, "X", PlayerInfo[playerid][pX] = X);
  30. dini_FloatSet(file, "Y", PlayerInfo[playerid][pY] = Y);
  31. dini_FloatSet(file, "Z", PlayerInfo[playerid][pZ] = Z);
  32. return 1;
  33. }
  34. //^The command was i change/revision
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement