04.08.2014, 12:51
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
{
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