Guest User

SETSPAWN WITH CMD

a guest
Feb 26th, 2020
81
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CMD:savep(playerid, params[])
  2. {
  3. new file[64], Float:x, Float:y, Float:z;
  4. GetPlayerPos(playerid, x, y, z);
  5. format(file, sizeof(file), "jcnrplayerlocation/%s.ini", RPNU(playerid));
  6. if(!dini_Exists(file)) dini_Create(file);
  7. dini_FloatSet(file, "X", PlayerInfo[playerid][pX]);
  8. dini_FloatSet(file, "Y", PlayerInfo[playerid][pY]);
  9. dini_FloatSet(file, "Z", PlayerInfo[playerid][pZ]);
  10. SendClientMessage(playerid, COLOR_WHITE, "SERVER: Kamu telah mengset save tempat spawn kamu disini");
  11. SendClientMessage(playerid, COLOR_WHITE, "SERVER: Spawn kamu gak akan pernah berubah selama kamu tidak /save lagi!");
  12. return 1;
  13. }
RAW Paste Data