18.09.2010, 19:25
How to use sscanf to set hex color? I tried this but it doesn't work. (Server Unknown Command)
pawn Код:
dcmd_setcolor(playerid, params[]){
new giveplayerid;
new colorid;
if(!IsPlayerAdmin(playerid)){
SendClientMessage(playerid, COLOR_WHITE, "*[INFO]: Tik RCON Administratoriams!");
return 1;
}
if(sscanf(params, "dh",giveplayerid,colorid)){
return SetcolorUsage(playerid);
}
if(giveplayerid < 0 || giveplayerid > 200) return WrongPlayerID(playerid);
if(!IsPlayerConnected(giveplayerid)) return WrongPlayerID(playerid);
SetPlayerColor(playerid,colorid);
return 1;
}