Guest User

Untitled

a guest
Dec 9th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.75 KB | None | 0 0
  1. COMMAND:tpto(playerid, params[])
  2. {
  3.     HELPER_CHECK;
  4.     if(!strlen(params)) return SendClientMessage(playerid, COLOUR_RED, "Usage: /tpto [playerid]");
  5.     if(GetPlayerTeam(playerid) == TEAM_COP && !strcmp("Brooksey", ReturnName(playerid))) return SendClientMessage(playerid, COLOUR_RED, "Hey Tim. No teleporting for you as a cop.");
  6.     new Float:coo[3];
  7.     GetPlayerPos(strval(params), coo[0], coo[1], coo[2]);
  8.     if(IsPlayerInAnyVehicle(playerid))
  9.     {
  10.         new vehicleid = GetPlayerVehicleID(playerid);
  11.         SetVehiclePos(vehicleid, coo[0], coo[1], coo[2]);
  12.     }
  13.     else SetPlayerPos(playerid, coo[0], coo[1], coo[2]);
  14.     format(UNU_string, sizeof(UNU_string), "%s teleported to you", ReturnName(playerid));
  15.     SendClientMessage(strval(params), COLOUR_GREEN, UNU_string);
  16.     return 1;
  17. }
Add Comment
Please, Sign In to add comment