19.02.2014, 20:50
Hi guys, i've a problem with the callback OnPlayerDeath.
All the callback is as don't exist, also if is right; Help me please
All the callback is as don't exist, also if is right; Help me please
Код:
new jjplayer[MAX_PLAYERS]; new bool:jjon = false; new jasonid[MAX_PLAYERS] = 0; new jason, playerjason, jjmorto[MAX_PLAYERS]; public OnPlayerDeath(playerid, killerid, reason) { if(playerid == jjplayer[playerid] && killerid == jasonid[killerid]) { new namej[24], stringaj[128]; GetPlayerName(playerid, namej, sizeof(namej)); format(stringaj,128,"[EVENTO] Jason ha ucciso %s!", namej); for(new i = 0; i < MAX_PLAYERS; i++) { if(jjplayer[i]) return SendClientMessage(i, giallo, stringaj); if(jasonid[i]) return SendClientMessage(i, rosso, "*** Sete di saaaangue!"); } jjmorto[playerid] = 1; playerjason --; } if(killerid != jasonid[killerid] && playerid == jjplayer[playerid]) { new namej[24], stringaj[128]; GetPlayerName(killerid, namej, sizeof(namej)); format(stringaj,128,"[EVENTO] %s и stato automaticamente kickato per aver killato un giocatore all'evento!"); SendClientMessageToAll(rosso, stringaj); SetTimerEx("kick", 1000, false, "d", killerid); } if(playerjason == 0) { SendClientMessageToAll(rosso, "[EVENTO] Jason ha ucciso tutte le sue prede!"); SendClientMessageToAll(rosso, "Di conseguenza ha vinto 20 cookies e 30 EXP come premio!"); SendClientMessageToAll(giallo, "*** Evento Jason il Killer chiuso automaticamente!"); jjon = false; for(new i = 0; i < MAX_PLAYERS; i++) jjmorto[i] = 0, jjplayer[i] = 0, jasonid[i] = 0, jason = 0, playerjason = 0; } jjmorto[playerid] = 1; jjplayer[playerid] = 0; return 1; }