CMD:setpvar(playerid, params[])
{
if(IsPlayerAnAdmin(playerid,3))
{
new toplayerid, amount, string[64];
if (!sscanf(params, "uci", toplayerid, string, amount))
{
if (toplayerid != INVALID_PLAYER_ID)
{
new message[200];
SetPVarInt(toplayerid,string,amount);
}
else SCM(playerid,RED,"Bad ID");
}
else SCM(playerid,RED,"INFO: /setpvar <playerid> <PVarInt> <number>");
}
else SCM(playerid,RED,"You are not admin!");
return 1;
}
if (!sscanf(params, "uci", toplayerid, string, amount))
if (sscanf(params, "uci", toplayerid, string, amount))
INFO: /setpvar <playerid> <PVarInt> <number>
if (sscanf(params, "usi", toplayerid, string[64], amount))
CMD:setpvar(playerid, params[]) { if(IsPlayerAnAdmin(playerid,3)) { new toplayerid, amount, string[64]; if (sscanf(params, "usi", toplayerid, string[64], amount)) SCM(playerid,RED,"INFO: /setpvar <playerid> <PVarInt> <number>"); if (toplayerid == INVALID_PLAYER_ID) return SCM(playerid,RED,"Bad ID"); new message[200]; SetPVarInt(toplayerid,string,amount); } else SCM(playerid,RED,"You are not admin!"); return 1; }
OK, the core problem here is:
Код:
if (!sscanf(params, "uci", toplayerid, string, amount)) So try: Код:
if (sscanf(params, "uci", toplayerid, string, amount)) ![]() |