Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:teleport(playerid,params[])//the command
- {//first bracket
- new Float:x;//pos x
- new Float:y;//oos y
- new Float:z;//pos z
- new interior;
- new string[128];//the message string
- 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
- 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
- SendClientMessage(playerid,-1,string);//now let's send him this message with the coordinates!
- SetPlayerInterior(playerid,interior);//now we will set the player interior
- SetPlayerPos(playerid,Float:x,Float:y,Float:z);//now let's teleport him to this pos!
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement