Advertisement
Guest User

Untitled

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