07.08.2013, 03:55
if you want only admins use that command, put this way
or if you want only player uses that command use;
pawn Код:
CMD:skydive(playerid, params[])
{
if(IsPlayerLuxAdminLevel(playerid,3) || IsPlayerAdmin(playerid));
{
new Float:pPos[3], km;
if(sscanf(params, "i", km)) return SendClientMessage(playerid, COLOR_RED, "John: /skydive [meters]");
if(km <= -1 || km >= 3001) return SendClientMessage(playerid, COLOR_RED, "John: You cannot use negative amount or amounts higher than 3000! Its too Dangerous!");
if(GetPlayerWeapon(playerid) != 46) return SendClientMessage(playerid, COLOR_RED, "John: Probably would've been better with a /chute...");
if(IsPlayerInWater(playerid))return SendClientMessage(playerid, COLOR_RED, "John: You cannot be force pushed while in water!");
GetPlayerPos(playerid,pPos[0],pPos[1],pPos[2]);
SetPlayerPos(playerid,pPos[0],pPos[1],pPos[2]+km);
}
else SendClientMessage(playerid, COLOR_RED, "Error: You are not an Admin!");
return 1;
}
pawn Код:
CMD:skydive(playerid, params[])
{
if(IsPlayerLuxAdmin(playerid) || !IsPlayerAdmin(playerid));
{
new Float:pPos[3], km;
if(sscanf(params, "i", km)) return SendClientMessage(playerid, COLOR_RED, "John: /skydive [meters]");
if(km <= -1 || km >= 3001) return SendClientMessage(playerid, COLOR_RED, "John: You cannot use negative amount or amounts higher than 3000! Its too Dangerous!");
if(GetPlayerWeapon(playerid) != 46) return SendClientMessage(playerid, COLOR_RED, "John: Probably would've been better with a /chute...");
if(IsPlayerInWater(playerid))return SendClientMessage(playerid, COLOR_RED, "John: You cannot be force pushed while in water!");
GetPlayerPos(playerid,pPos[0],pPos[1],pPos[2]);
SetPlayerPos(playerid,pPos[0],pPos[1],pPos[2]+km);
}
else SendClientMessage(playerid, COLOR_RED, "Error: You are not an player!");
return 1;
}