Advertisement
moabcavsa

Untitled

Apr 10th, 2019
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. CMD:teleport(playerid,params[])//the command
  2. {//first bracket
  3. new Float:x;//pos x
  4. new Float:y;//oos y
  5. new Float:z;//pos z
  6. new interior;
  7.  
  8. new string[128];//the message string
  9. if(sscanf(params,"fffi", Float:x, Float:y, Float:z,interior)) return SendClientMessage(playerid, -1,"{FF0000}Error:{FFFFFF}/teleport [x] [y] [z] [interior]");//the message
  10. format(string,sizeof(string),"You have been teleported to coordinates: %.0f.%.0f.%.0f interior: %d",x,y,z,interior);//this is the format for our message
  11. SendClientMessage(playerid,-1,string);//now let's send him this message with the coordinates!
  12. SetPlayerInterior(playerid,interior);//now we will set the player interior
  13. SetPlayerPos(playerid,Float:x,Float:y,Float:z);//now let's teleport him to this pos!
  14. return 1;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement