07.02.2014, 10:27
Hello ,
I have a Goto command and i want to make it for all players but i want also to allow /goff for playerid so no one can goto him, how to make like that ?
GOTO Command:
I want the command be if(strcmp(cmdtext, "/goto", true) == 0) thank s !
I have a Goto command and i want to make it for all players but i want also to allow /goff for playerid so no one can goto him, how to make like that ?
GOTO Command:
Код:
CMD:goto(playerid, params[])
{
new id,Float:Pos[3];
if(sscanf(params, "u", id)) return SendClientMessage(playerid, yellow, "Usage: /goto <Player ID>");
if(IsPlayerConnected(id) && id != playerid)
{
GetPlayerPos(id,Pos[0],Pos[1],Pos[2]);
SetPlayerInterior(playerid,GetPlayerInterior(id));
SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(id));
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
SetVehiclePos(GetPlayerVehicleID(playerid),Pos[0]+3,Pos[1],Pos[2]);
LinkVehicleToInterior(GetPlayerVehicleID(playerid),GetPlayerInterior(id));
SetVehicleVirtualWorld(GetPlayerVehicleID(playerid),GetPlayerVirtualWorld(id));
}
else SetPlayerPos(playerid,Pos[0]+3,Pos[1],Pos[2]);
format(Jstring,sizeof(Jstring),"You have been Teleported to '%s'", GetName(id));
SendClientMessage(playerid,yellow,Jstring);
return 1;
}
else return ShowMessage(playerid, red, 3);
}


