13.09.2012, 22:14
pawn Код:
command(lotto, playerid, params[])
{
if(IsPlayerConnected(playerid))
{
new nr;
if(sscanf(params, "i", nr)) return SendClientUsage(playerid, "USAGE: /lotto nr");
playerVariables[playerid][pLotteryTicket] = nr;
SendClientMessage(playerid,-1,sprintf("NR:%d",playerVariables[playerid][pLotteryTicket]));
return 1;
}
return 1;
}
command(test3, playerid, params[])
{
#pragma unused params
if(IsPlayerConnected(playerid))
{
foreach(new i : Player) {
SendClientMessage(playerid,-1,sprintf("ID %d has NR:%d",i, playerVariables[i][pLotteryTicket]));
}
}
return 1;
}