19.10.2009, 05:28
I'm not sure where to post about PAWN crashes so I appologize in advance. Basically my issue is that ever since I added the OnPlayerKeyStateChange callback to my script the compiler crashes. Maybe I'm too tired to notice my errors but here's the code that's doing it:
Formating is horrible and I suck at using forums, sorry about that.
Код:
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys);
{
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_DRINK_BEER || GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_DRINK_WINE)
{
new msg[25];
if ((oldkeys & KEY_FIRE) && !(newkeys & KEY_FIRE))
{
new drunklvl = GetPlayerDrunkLevel(playerid);
format(msg,sizeof(msg),"Drunk: %d",drunklvl);
SendClientMessage(playerid,COLOR_YELLOW,msg);
}
}
return 1;
}

