01.01.2017, 08:39
So i am using a script (not mine) that means i didnt code it and i want change something like i cant use the cmd just if i am in aod and i cant use it on myself how to remove it ?
Код:
COMMAND:giveweapon(playerid, params[])
{
if(!adminLevel(playerid, 3))
return 0;
new otherID, msg[128], weaponid;
if(sscanf(params, "ud", otherID, weaponid))
{
Usage(playerid, "giveweapon <playerid> <weaponid>");
}
else
{
if(!Player[playerid][onDuty])
{
Server(playerid, "You must be on duty admin.");
return 1;
}
if(isMe(playerid, otherID))
{
Server(playerid, "You can't use this command to yourself.");
}
else
{
if(!isConnected(otherID))
{
Server(playerid, "That player isn't logged in!");
return 1;
}
if(isHigher(playerid, otherID))
Server(playerid, "You can't use this command to that player.");
else
{
format(msg, sizeof(msg), "give %s a weapon(%d).", GetName(otherID), weaponid);
changeAlog(playerid, msg);
GivePlayerWeapon(otherID, weaponid, 9999999);
format(msg, sizeof(msg), "Administrator give you a weapon.");
Server(otherID, msg);
format(msg, sizeof(msg), "You have given "CHAT_YELLOW"%s(%d)"CHAT_WHITE" weapon(%d).", GetName(otherID), otherID, weaponid);
Server(playerid, msg);
}
}
}
return 1;
}
