24.10.2014, 11:51
You don't understand. For example in this command, admin have to be level 1 or greater to use this command, or if player is not an admin he has to be GameMaster level 1 or greater, and if player is not admin or game master he can't use this command at all..
pawn Код:
CMD:goto(playerid, params[])
{
if(LoggedIN[playerid] == 0) return SCM(playerid, GREY, "YOu have to be logged-in first.");
new id, veh = GetPlayerVehicleID(playerid), Float:X, Float:Y, Float:Z;
if(PI[playerid][Admin] == 0 || PI[playerid][GameMaster]) return SCM(playerid, GREY, "Not allowed.");
if(sscanf(params, "u", id)) return SCM(playerid, GREY, "Use: /goto [ID / Part of Name]");
if(!IsPlayerConnected(id)) return SCM(playerid, GREY, "That player is not online.");
if(IsPlayerInAnyVehicle(playerid))
{
GetPlayerPos(id, X, Y, Z);
SetVehiclePos(veh, X, Y+2, Z);
LinkVehicleToInterior(veh, GetPlayerInterior(id));
SetPlayerVirtualWorld(veh, GetPlayerVirtualWorld(id));
}
else
{
GetPlayerPos(id, X, Y, Z);
SetPlayerPos(playerid, X, Y+2, Z);
SetPlayerInterior(playerid, GetPlayerInterior(id));
SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(id));
}
SCM(playerid, GREY, "You have been teleported.");
return 1;
}