CMD:sethp(playerid,params[])
{
if(IsPlayerConnected(playerid))
{
new id,Float:c;
if(sscanf(params,"rf",id,c))
{
SendClientMessage(playerid, COLOR_GRAD, "USAGE: /sethp [Playerid/PartOfName] [Health]");
return 1;
}
if (PlayerInfo[playerid][pAdmin] >= 4)
{
if(IsPlayerConnected(id))
{
if(id!= INVALID_PLAYER_ID)
{
SetPlayerHealth(id, c);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD, "You are not authorized to use that command!");
}
}
return 1;
}
CMD:setarmor(playerid,params[])
{
if(IsPlayerConnected(playerid))
{
new id,Float:c;
if(sscanf(params,"rf",id,c))
{
SendClientMessage(playerid, COLOR_GRAD, "USAGE: /setarmor [Playerid/PartOfName] [Armor]");
return 1;
}
if (PlayerInfo[playerid][pAdmin] >= 4)
{
if(IsPlayerConnected(id))
{
if(id!= INVALID_PLAYER_ID)
{
SetPlayerArmour(id, c);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD, "You are not authorized to use that command!");
}
}
return 1;
}
CMD:sethp(playerid, params[]) { new id, hp; if(PlayerInfo[playerid][pAdmin] >= 4) return SendClientMessage(playerid, COLOR_GRAD, "You are not authorized to use that command!"); if(sscanf(params, "ud", id, hp)) return SendClientMessage(playerid, COLOR_GRAD, "USAGE: /sethp [Playerid/PartOfName] [Health]"); if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "[Error] Player not connected."); new Float:hp2 = float(hp); SetPlayerHealth(id, hp2); return 1; } CMD:setarmor(playerid, params[]) { new id, armor; if(PlayerInfo[playerid][pAdmin] >= 4) return SendClientMessage(playerid, COLOR_GRAD, "You are not authorized to use that command!"); if(sscanf(params, "ud", id, armor)) return SendClientMessage(playerid, COLOR_GRAD, "USAGE: /setarmor [Playerid/PartOfName] [Armor]"); if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "[Error] Player not connected."); new Float:armor2 = float(armor); SetPlayerArmour(id, armor2); return 1; }
C:\Users\Jaua\Downloads\gta-rp\gamemodes\GTARP.pwn(1465) : warning 204: symbol is assigned a value that is never used: "armor2" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Warning.
Код:
C:\Users\Jaua\Downloads\gta-rp\gamemodes\GTARP.pwn(1465) : warning 204: symbol is assigned a value that is never used: "armor2" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Warning. |
CMD:sethp(playerid, params[])
{
new id, Float:hp;
if(PlayerInfo[playerid][pAdmin] < 4) return SendClientMessage(playerid, COLOR_GRAD, "You are not authorized to use that command!");
if(sscanf(params, "uf", id, hp)) return SendClientMessage(playerid, COLOR_GRAD, "USAGE: /sethp [Playerid/PartOfName] [Health]");
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "[Error] Player not connected.");
SetPlayerHealth(id, hp);
return 1;
}
CMD:setarmor(playerid, params[])
{
new id, Float:armor;
if(PlayerInfo[playerid][pAdmin] < 4) return SendClientMessage(playerid, COLOR_GRAD, "You are not authorized to use that command!");
if(sscanf(params, "uf", id, armor)) return SendClientMessage(playerid, COLOR_GRAD, "USAGE: /setarmor [Playerid/PartOfName] [Armor]");
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "[Error] Player not connected.");
SetPlayerArmour(id, armor);
return 1;
}