dcmd_giveweapon(playerid, params[]) { new pID, weap, ammo; if(PlayerInfo[playerid][pAdminLevel] >= 1) { if(sscanf(params, "ud", pID, weap,ammo)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /giveweapon [playerid] [weaponid] [amount of ammo]"); if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_RED, "This player is not connected"); if(weap == 35 && 36 && 38) { SendClientMessage(playerid, COLOR_RED, "This weapon is disabled in our server"); } else if(!IsValidWeapon(weap)) return SendClientMessage(playerid,red,"ERROR: Invalid weapon ID"); else{ GivePlayerWeapon(pID,weap,ammo); } } else if(PlayerInfo[playerid][pAdminLevel] == 0) return SendClientMessage(playerid, COLOR_RED, "You are not admin."); return 1; }
dcmd_giveweapon(playerid, params[])
{
new pID, weap, ammo;
if(PlayerInfo[playerid][pAdminLevel] >= 1)
{
if(sscanf(params, "udd", pID, weap,ammo)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /giveweapon [playerid] [weaponid] [amount of ammo]");
if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_RED, "This player is not connected");
if(weap == 35 && 36 && 38)
{
SendClientMessage(playerid, COLOR_RED, "This weapon is disabled in our server");
}
else if(!IsValidWeapon(weap)) return SendClientMessage(playerid,red,"ERROR: Invalid weapon ID");
else{
GivePlayerWeapon(pID,weap,ammo);
}
}
else if(PlayerInfo[playerid][pAdminLevel] == 0) return SendClientMessage(playerid, COLOR_RED, "You are not admin.");
return 1;
}
dcmd_giveweapon(playerid, params[])
{
new pID, weap, ammo;
if(PlayerInfo[playerid][pAdminLevel] >= 1)
{
if(sscanf(params, "udd", pID, weap,ammo)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /giveweapon [playerid] [weaponid] [amount of ammo]");
if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_RED, "This player is not connected");
if(weap == 35 && 36 && 38)
{
SendClientMessage(playerid, COLOR_RED, "This weapon is disabled in our server");
}
else if(!IsValidWeapon(weap)) return SendClientMessage(playerid,red,"ERROR: Invalid weapon ID");
else{
GivePlayerWeapon(pID,weap,ammo);
}
}
else if(PlayerInfo[playerid][pAdminLevel] == 0) return SendClientMessage(playerid, COLOR_RED, "You are not admin.");
return 1;
}
pawn Код:
|
dcmd_giveweapon(playerid, params[])
{
new pID, weap, ammo;
if(PlayerInfo[playerid][pAdminLevel] >= 1)
{
if(sscanf(params, "udd", pID, weap,ammo)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /giveweapon [playerid] [weaponid] [amount of ammo]");
if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_RED, "This player is not connected");
if(weap == 35 && 36 && 38) return SendClientMessage(playerid,red,"ERROR: Invalid weapon ID");
{
SendClientMessage(playerid, COLOR_RED, "This weapon is disabled in our server");
}
else{
GivePlayerWeapon(pID,weap,ammo);
}
}
else if(PlayerInfo[playerid][pAdminLevel] == 0) return SendClientMessage(playerid, COLOR_RED, "You are not admin.");
return 1;
}
dcmd_giveweapon(playerid, params[])
{
new pID, weap, ammo;
if(PlayerInfo[playerid][pAdminLevel] >= 1)
{
if(sscanf(params, "ud", pID, weap,ammo)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /giveweapon [playerid] [weaponid] [amount of ammo]");
if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_RED, "This player is not connected");
if(weap == 35 || 36 || 38)return SendClientMessage(playerid, COLOR_RED, "This weapon is disabled in our server");
if(IsValidWeapon(weap)) return SendClientMessage(playerid,red,"ERROR: Invalid weapon ID");
GivePlayerWeapon(pID,weap,ammo);
}
else return SendClientMessage(playerid, COLOR_RED, "You are not admin.");
return 1;
}
dcmd_giveweapon(playerid, params[])
{
new pID, weap, ammo;
if(PlayerInfo[playerid][pAdminLevel] >= 1)
{
if(sscanf(params, "ud", pID, weap,ammo)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /giveweapon [playerid] [weaponid] [amount of ammo]");
if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_RED, "This player is not connected");
if(weap == 35 || weap == 36 || weap == 38)return SendClientMessage(playerid, COLOR_RED, "This weapon is disabled in our server");
if(!IsValidWeapon(weap)) return SendClientMessage(playerid,red,"ERROR: Invalid weapon ID");
GivePlayerWeapon(pID,weap,ammo);
}
else return SendClientMessage(playerid, COLOR_RED, "You are not admin.");
return 1;
}