18.03.2017, 11:57
Hi
so i go straight to the point problem is that if you're red team your ability is that you get explosion after death, right? So if round is over and starting other you randomly selected now to Blue team so if red team kill you, you get explode bat it shouldn't work like this. Explosion on that only should have red team. So idk whats wrong
I'm pretty sure it would be problem with all OnPlayerDeath callback because off { }
Bat anyway code of ability
If you no see any problem here send me private message because i dont want drop all "OnPlayerDeath" callback here.
so i go straight to the point problem is that if you're red team your ability is that you get explosion after death, right? So if round is over and starting other you randomly selected now to Blue team so if red team kill you, you get explode bat it shouldn't work like this. Explosion on that only should have red team. So idk whats wrong
I'm pretty sure it would be problem with all OnPlayerDeath callback because off { }
Bat anyway code of ability
Код:
if(pInfo[playerid][pRedClass] == BOOMER) { new explodecount; GetPlayerPos(playerid,Float:x,Float:y,Float:z); CreateExplosion(Float:x,Float:y,Float:z,0,6.0); foreach(new i : Player) { if(!IsPlayerConnected(i)) continue; if(i == playerid) continue; if(pInfo[i][pRedClass] == BOOMER) continue; if(IsPlayerInRangeOfPoint(i,7.0,Float:x,Float:y,Float:z)) { if(pInfo[i][IsPlayerInfected] == 0) { InfectPlayerStandard(i); explodecount++; } } } if(explodecount > 0) { new zmstring2[256],pNames[MAX_PLAYER_NAME]; GetPlayerName(playerid,pNames,sizeof(pNames)); format(zmstring2,sizeof(zmstring2),""COL_GREEN"%s has been exploded "COL_WHITE"%i players.",pNames,explodecount); SendClientMessageToAll(-1,zmstring2); } } }