Code:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid){
new Float:danio, string[128];
new fuerza = JugadorInfo[issuerid][jFuerza];
if(issuerid != INVALID_PLAYER_ID){
if(amount == 2.64){
switch(fuerza){
case 0..10: danio = 5.0;
case 11..20: danio = 5.5;
case 21..30: danio = 6.0;
case 31..40: danio = 6.5;
case 41..50: danio = 7.0;
case 51..60: danio = 7.5;
case 61..70: danio = 8.0;
case 71..80: danio = 8.5;
case 81..90: danio = 9.0;
case 91..10000: danio = 9.5;
}
}
else{
switch(weaponid){
case 0:{
if(EsPolicia(issuerid) && PuedeEmbestir[issuerid] == 1){
if(Embestido[playerid] == 0 && Paralizado[playerid] == 0){
new embestida = random(4)+1;
if(embestida == 1){
format(string, sizeof(string), "* %s intentу tirar bruscamente a %s en forma de embestida pero no consiguiу embestirlo.", NombreIC(issuerid), NombreIC(playerid));
ProxDetector(30.0, playerid, string, COLOR_ACCIONES, COLOR_ACCIONES, COLOR_ACCIONES, COLOR_ACCIONES, COLOR_ACCIONES);
}
else{
format(string, sizeof(string), "* %s intentу tirar bruscamente a %s en forma de embestida y consiguiу hacerlo.", NombreIC(issuerid), NombreIC(playerid));
ProxDetector(30.0, playerid, string, COLOR_ACCIONES, COLOR_ACCIONES, COLOR_ACCIONES, COLOR_ACCIONES, COLOR_ACCIONES);
GameTextForPlayer(playerid, "Embestido", 3000, 3);
TogglePlayerControllable(playerid, 0);
ApplyAnimation(playerid,"PED","BIKE_fallR",4.0,0,1,1,1,0);
ApplyAnimation(playerid,"PED","BIKE_fallR",4.0,0,1,1,1,0);
Embestido[playerid] = 1;
SetTimerEx("LevantarseEmbestido", 3000, false, "i", playerid);
}
}
}
switch(fuerza){
case 0..10: danio = 2.0;
case 11..20: danio = 2.5;
case 21..30: danio = 3.0;
case 31..40: danio = 3.5;
case 41..50: danio = 4.0;
case 51..60: danio = 4.5;
case 61..70: danio = 5.0;
case 71..80: danio = 5.5;
case 81..90: danio = 6.0;
case 91..10000: danio = 6.5;
}
}
case 1:{
switch(fuerza){
case 0..10: danio = 2.5;
case 11..20: danio = 3.0;
case 21..30: danio = 3.5;
case 31..40: danio = 4.0;
case 41..50: danio = 4.5;
case 51..60: danio = 5.0;
case 61..70: danio = 5.5;
case 71..80: danio = 6.0;
case 81..90: danio = 6.5;
case 91..10000: danio = 7.0;
}
}
case 2,3,5,6,7,15:{
switch(fuerza){
case 0..10: danio = 5.0;
case 11..20: danio = 5.5;
case 21..30: danio = 6.0;
case 31..40: danio = 6.5;
case 41..50: danio = 7.0;
case 51..60: danio = 7.5;
case 61..70: danio = 8.0;
case 71..80: danio = 8.5;
case 81..90: danio = 9.0;
case 91..10000: danio = 9.5;
}
}
case 4:{
switch(fuerza){
case 0..10: danio = 6.0;
case 11..20: danio = 6.5;
case 21..30: danio = 7.0;
case 31..40: danio = 7.5;
case 41..50: danio = 8.0;
case 51..60: danio = 8.5;
case 61..70: danio = 9.0;
case 71..80: danio = 9.5;
case 81..90: danio = 10.0;
case 91..10000: danio = 10.5;
}
}
case 8:{
switch(fuerza){
case 0..10: danio = 8.0;
case 11..20: danio = 8.5;
case 21..30: danio = 9.0;
case 31..40: danio = 9.5;
case 41..50: danio = 10.0;
case 51..60: danio = 10.5;
case 61..70: danio = 11.0;
case 71..80: danio = 11.5;
case 81..90: danio = 12.0;
case 91..10000: danio = 12.5;
}
}
case 22: danio = 40.0;
case 23:{
if(EsPolicia(issuerid) && Taser[issuerid] == 1){
if(Paralizado[playerid] == 0){
danio = 0.0;
format(string, sizeof(string), "* %s le efectuу un disparo con un tбser disparador de cables a %s, paralizбndolo.", NombreIC(issuerid), NombreIC(playerid));
ProxDetector(30.0, playerid, string, COLOR_ACCIONES, COLOR_ACCIONES, COLOR_ACCIONES, COLOR_ACCIONES, COLOR_ACCIONES);
Mensaje(issuerid, COLOR_BLANCO, "Ha logrado paralizarlo con su tбser, para quitarle el parбlisis, utilice el comando '/q(uitar)cables' [ID Jugador].");
Mensaje(playerid, COLOR_BLANCO, "Usted ha sido paralizado, para que se le quite el parбlisis, debe esperar a que le quiten los cables.");
GameTextForPlayer(playerid, "Paralizado", 3000, 3);
TogglePlayerControllable(playerid, 0);
ApplyAnimation(playerid,"PED","KO_shot_face",4.0,0,1,1,1,0);
ApplyAnimation(playerid,"PED","KO_shot_face",4.0,0,1,1,1,0);
Paralizado[playerid] = 1;
}
}
else{
danio = 40.0;
}
}
case 24: danio = 70.0;
case 25:{
if(EsPolicia(issuerid) && BalasDeGoma[issuerid] == 1){
if(Paralizado[playerid] == 0){
danio = 0.0;
format(string, sizeof(string), "* %s le efectuу un disparo con una escopeta de balas de goma %s, paralizбndolo.", NombreIC(issuerid), NombreIC(playerid));
ProxDetector(30.0, playerid, string, COLOR_ACCIONES, COLOR_ACCIONES, COLOR_ACCIONES, COLOR_ACCIONES, COLOR_ACCIONES);
Mensaje(issuerid, COLOR_BLANCO, "Ha logrado paralizarlo con su escopeta de balas de goma, se le quitarб su parбlisis en 15 segundos.");
Mensaje(playerid, COLOR_BLANCO, "Usted ha sido paralizado, se le quitarб el parбlisis en 15 segundos.");
GameTextForPlayer(playerid, "Paralizado", 3000, 3);
TogglePlayerControllable(playerid, 0);
ApplyAnimation(playerid, "SWEET", "LaFin_Sweet", 4.0, 0, 1, 1, 1, 0);
ApplyAnimation(playerid, "SWEET", "LaFin_Sweet", 4.0, 0, 1, 1, 1, 0);
Paralizado[playerid] = 1;
SetTimerEx("LevantarseParalizado", 15000, false, "i", playerid);
}
}
else{
danio = 80.0;
}
}
case 26: danio = 83.0;
case 27: danio = 85.0;
case 28,32: danio = 20.0;
case 29: danio = 40.0;
case 30: danio = 45.0;
case 31: danio = 44.0;
case 33: danio = 25.0;
case 34: danio = 90.0;
default: danio = amount;
}
}
if(weaponid >= 22 && weaponid <= 34){
new aviso = random(4)+1;
if(aviso == 1){
//
}
else{
if(GetPlayerInterior(playerid) == 0){
new zona[128];
GetPlayer2DZone(playerid, zona, 128);
format(string, sizeof(string), "** [CENTRAL] Un sujeto denuncia que se oyen disparos en la zona de %s. **", zona);
MensajeRadioIC(1, COLOR_RADIO, string);
}
}
}
TextDrawShowForPlayer(playerid, TextDrawFlashDanio);
SetPlayerDrunkLevel(playerid, 60000);
TFlash[playerid] = SetTimerEx("Flash", 250, 1, "i", playerid);
TMareo[playerid] = SetTimerEx("Mareo", 5000, 1, "i", playerid);
GetPlayerHealth(playerid, JugadorInfo[playerid][jVida]);
GetPlayerArmour(playerid, JugadorInfo[playerid][jChaleco]);
if(JugadorInfo[playerid][jChaleco]){
if(JugadorInfo[playerid][jChaleco] > danio) EstablecerChaleco(playerid, JugadorInfo[playerid][jChaleco]-danio);
else{
EstablecerChaleco(playerid, 0.0);
JugadorInfo[playerid][jChaleco] = danio-JugadorInfo[playerid][jChaleco];
if(JugadorInfo[playerid][jChaleco] >= JugadorInfo[playerid][jVida]) EstablecerVida(playerid, 0.0);
else EstablecerVida(playerid, JugadorInfo[playerid][jVida]-JugadorInfo[playerid][jChaleco]);
}
}
else{
if(JugadorInfo[playerid][jVida] > danio) EstablecerVida(playerid, JugadorInfo[playerid][jVida]-danio);
else EstablecerVida(playerid, 0.0);
}
}
return 1;
}
Your codes an actual cluster fuck. You need to find the line it's originating from.
65535 is INVALID_PLAYER_ID.
Compile your script with -d3. Make a pawn.cfg and put it in pawno/.
Restart the server and check server_log. The line it's originating from should display.
Add a check to make sure playerid isn't an INVALID_PLAYER_ID. See if that fixes it.
Those two are not related. The run time error is here:
array.
plugin. All I can do is suggest another timerfix plugin: