[Help] /goto and /nogoto
#7

CMD:goto(playerid, params[])
{
if (sscanf(params, "u", id))
return SendClientMessage(playerid, -1, "Usage: /goto [id/name]");

if (!IsPlayerConnected(id))
return SendClientMessage(playerid, -1, "Error: Player is not connected.");

if (Goto_Disabled[playerid] == true)
return SendClientMessage(playerid, -1, "Error: Player does not want anyone to teleport to him.");

new Float, Float:y, Float:z;
GetPlayerPos(id,x,y,z);
if (IsPlayerInAnyVehicle(playerid))
{
SetVehiclePos(GetPlayerVehicleID(playerid), x, y, z + 1.0);
SendClientMessage(playerid, -1, string);
}
else
{
SetPlayerPos(playerid, x, y, z + 1.0);
SendClientMessage(playerid,-1,string);
}
return 1;
}

CMD:nogoto(playerid, params[])
{
if (Goto_Disabled[playerid] == false)
{
SendClientMessage(playerid, -1, "Players are now unable to teleport to you.");
Goto_Disabled[playerid] = true;
}
else if (Goto_Disabled[playerid] == true)
{
SendClientMessage(playerid, -1, "Players are now able to teleport to you.");
Goto_Disabled[playerid] = false;
}
return 1;
}



upload pics
Reply


Messages In This Thread
[Help] /goto and /nogoto - by goldenpower - 04.08.2014, 06:31
Re: [Help] /goto and /nogoto - by GShock - 04.08.2014, 06:36
Re: [Help] /goto and /nogoto - by Stinged - 04.08.2014, 08:23
Re: [Help] /goto and /nogoto - by goldenpower - 04.08.2014, 09:06
Re: [Help] /goto and /nogoto - by Stinged - 04.08.2014, 10:29
Re: [Help] /goto and /nogoto - by SpikY_ - 04.08.2014, 11:31
Re: [Help] /goto and /nogoto - by goldenpower - 04.08.2014, 12:51
Re: [Help] /goto and /nogoto - by SpikY_ - 04.08.2014, 12:58
Re: [Help] /goto and /nogoto - by Stinged - 04.08.2014, 13:29
Re: [Help] /goto and /nogoto - by goldenpower - 04.08.2014, 14:02

Forum Jump:


Users browsing this thread: 3 Guest(s)