Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- COMMAND:tpto(playerid, params[])
- {
- HELPER_CHECK;
- if(!strlen(params)) return SendClientMessage(playerid, COLOUR_RED, "Usage: /tpto [playerid]");
- if(GetPlayerTeam(playerid) == TEAM_COP && !strcmp("Brooksey", ReturnName(playerid))) return SendClientMessage(playerid, COLOUR_RED, "Hey Tim. No teleporting for you as a cop.");
- new Float:coo[3];
- GetPlayerPos(strval(params), coo[0], coo[1], coo[2]);
- if(IsPlayerInAnyVehicle(playerid))
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- SetVehiclePos(vehicleid, coo[0], coo[1], coo[2]);
- }
- else SetPlayerPos(playerid, coo[0], coo[1], coo[2]);
- format(UNU_string, sizeof(UNU_string), "%s teleported to you", ReturnName(playerid));
- SendClientMessage(strval(params), COLOUR_GREEN, UNU_string);
- return 1;
- }
Add Comment
Please, Sign In to add comment