11.02.2019, 02:17
Help me convert this command to zcmd and sort it ,,
Is this the good command?
dcmd_winner(playerid,params[])
{
if(event == 1)
{
if(IsPlayerAdmin(playerid))
{
new price, winner;
if(sscanf(params,"ui",winner,price)) return SendClientMessage(playerid,COLOR_RED,"Usage: /winner [ID] [Price]");
new str[128];
format(str,128,"{40E0D0}%s (%i) has won the event, and gained %d",PlayerName(winner),winner,price);
SendClientMessageToAll(-1,str);
GivePlayerMoney(winner,price);
return 1;
}
else{SendClientMessage(playerid,COLOR_RED,"You can't use this command!"); return 1;}
}
else{SendClientMessage(playerid,COLOR_RED,"There is no event running."); return 1;}
}
Is this the good command?
dcmd_winner(playerid,params[])
{
if(event == 1)
{
if(IsPlayerAdmin(playerid))
{
new price, winner;
if(sscanf(params,"ui",winner,price)) return SendClientMessage(playerid,COLOR_RED,"Usage: /winner [ID] [Price]");
new str[128];
format(str,128,"{40E0D0}%s (%i) has won the event, and gained %d",PlayerName(winner),winner,price);
SendClientMessageToAll(-1,str);
GivePlayerMoney(winner,price);
return 1;
}
else{SendClientMessage(playerid,COLOR_RED,"You can't use this command!"); return 1;}
}
else{SendClientMessage(playerid,COLOR_RED,"There is no event running."); return 1;}
}