29.03.2017, 09:09
Download the latest version of sscanf from:
https://sampforum.blast.hk/showthread.php?tid=570927
EDIT: Too Late :))
https://sampforum.blast.hk/showthread.php?tid=570927
PHP код:
CMD:sethp(playerid,params[])
{
new health, targetid;
if(PlayerInfo[playerid][pAdmin] < 1337) return SendClientMessage(playerid, -1, "You are not authorized to use this command!");
if(sscanf(params, "ui", targetid, health)) return SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /sethp [playerid] [health]");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, -1, "Player is not connected.");
SetPlayerHealth(targetid, health);
return 1;
}
CMD:setarmour(playerid,params[])
{
new armour, targetid;
if(PlayerInfo[playerid][pAdmin] < 1337) return SendClientMessage(playerid, -1, "You are not authorized to use this command!");
if(sscanf(params, "ui", targetid, health)) return SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /setarmour [playerid] [armour]");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, -1, "Player is not connected.");
SetPlayerArmour(targetid, armour);
return 1;
}
EDIT: Too Late :))