Vezi asa, desi tot cred ca vei primi crash: [pawn]#include <a_samp> #include <Colors> #include <0Admin_F> #pragma tabsize 0 /////////////////Variabiles///////////////// new luckyv[MAX_PLAYERS]; /////////////////Calback/////////////////////////// public OnPlayerConnect(playerid) { luckyv[playerid]=0; } public OnPlayerDisconnect(playerid) { luckyv[playerid]=0; } public OnPlayerCommandText(playerid,cmdtext[]) { if(strcmp("/startluckevent",cmdtext,true) ==0) { if(GetPlayerLevel(playerid) >=3) { new luckyvmsg[30]; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name)); format(luckyvmsg,sizeof(luckyvmsg),"Administrator %s has start the /joinlucky commands you now can see what you lucky you have ",name); SendClientMessageToAll(COLOR_RED,luckyvmsg); luckyv[playerid]=1; } else SendClientMessage(playerid,COLOR_RED,"You aren't an admin"); return 1; } if(strcmp("/closeluckevent",cmdtext,true) ==0) { if(GetPlayerLevel(playerid) >=3) { new luckyvmsg[30]; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name)); format(luckyvmsg,sizeof(luckyvmsg),"Administrator %s has close the /lucky :(now only players What joined in event",name); SendClientMessageToAll(COLOR_RED,luckyvmsg); SetTimer("Winner",60000,0); luckyv[playerid]=0; } else SendClientMessage(playerid,COLOR_RED,"You aren't an admin"); } if(strcmp("/joinlucky",cmdtext,true) ==0) { if(luckyv[playerid]==1) { new joinmsg[10]; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name)); format(joinmsg,sizeof(joinmsg),"%s has joined in the event.!"); SendClientMessageToAll(COLOR_RED,joinmsg); } else if(luckyv[playerid]==0) { SendClientMessage(playerid,COLOR_RED,"The event is not open or the join periody is close.Sorry try again later!"); } return 1; } return 1; } //////////////Public & Forward/////////////////// forward Winner(); public Winner() { for(new i;i <MAX_PLAYERS;i++) { new tmp[256]; new winner; winner=strval(tmp); switch(random(6) ) { case 0.5: { SendClientMessage(winner,COLOR_RED,"Your lucky is very bad.!"); } case 2.5: { SendClientMessage(winner,COLOR_RED,"Your lucky is good but is not enoungh to win.!"); } case 6: { GivePlayerMoney(winner,5000); SetPlayerScore(winner,GetPlayerScore(winner)+10); GivePlayerWeapon(winner,38,500); SendClientMessage(winner,COLOR_RED,"You reward is:money:5000,score+10,minigun:500 ammunition"); luckyv=0; } } } } ////////////////////////////////////////////////[/pawn]