Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2012
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. public OnPlayerCommandText(playerid, cmdtext[])
  2. {
  3. if(!strcmp("/s", cmdtext, true))
  4. {
  5. new carid = GetPlayerVehicleID(playerid);
  6. new Float:x,Float:y,Float:z;
  7. GetPlayerPos(playerid,x,y,z);
  8. SetPVarFloat(playerid,"X",x);
  9. SetPVarFloat(playerid,"Y",y);
  10. SetPVarFloat(playerid,"Z",z);
  11. if(Posaved[playerid] == 0)
  12. {
  13. Posaved[playerid] = 1;
  14. }
  15. return 1;
  16. }
  17. if(!strcmp("/r", cmdtext, true))
  18. {
  19. if(Posaved[playerid] == 1)
  20. {
  21. new carid = GetPlayerVehicleID(playerid);
  22. SetPlayerPos(playerid, GetPVarFloat(playerid,"X"), GetPVarFloat(playerid,"Y"), GetPVarFloat(playerid,"Z"));
  23. SetVehiclePos(carid, GetPVarFloat(playerid,"X"), GetPVarFloat(playerid,"Y"), GetPVarFloat(playerid,"Z"));
  24. }
  25. else SendClientMessage(playerid, Error, "You don't have Pos in Database, try {33CCCC}/s");
  26. return 1;
  27. }
  28. return 0;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement