08.02.2015, 04:20
bueno poniendo un sistema de tazer todo va bien pero al momento de compilar me tira un warning que es:
warning 209: function "S@@_OnPlayerTakeDamage" should return a value
por mas que le ponga el return 1; no lo quita pongo return 1; y me tira error el codigo que tengo es asi:
warning 209: function "S@@_OnPlayerTakeDamage" should return a value
por mas que le ponga el return 1; no lo quita pongo return 1; y me tira error el codigo que tengo es asi:
Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid) { //new Float:chaleco, Float:Dano; if(weaponid == 0) //Puсos { GivePlayerHealth(playerid, -amount*(float(PlayerInfo[issuerid][pFuerza]))/100); } if(issuerid != INVALID_PLAYER_ID) { if(weaponid == 23 && PlayerInfo[issuerid][pManoDer] == 38) //Mensaje de daсo por tбser { new string[128]; format(string, sizeof(string), "* %s dispara a %s (Pistola tбser)", pName(issuerid), pName(playerid)); Acciones(playerid, 8, string); format(string, sizeof(string), "* %s dispara a %s (Pistola tбser)", pName(issuerid), pName(playerid)); Acciones(playerid, 8, string); } } if(weaponid == 23 && PlayerInfo[issuerid][pManoDer] == 38 && !IsPlayerInAnyVehicle(playerid)) //Tбser { if(IsPlayerInAnyVehicle(playerid)){return 1;} new string[128]; TogglePlayerControllable(playerid, 0); Taseado[playerid] = 1; SetTimerEx("Destasear", 20000, false, "i", playerid); PlayerPlaySound(playerid, 6003, 0.0, 0.0, 0.0); PlayerPlaySound(issuerid, 6003, 0.0, 0.0, 0.0); format(string, sizeof(string), "* Has sido taseado por %s", pName(issuerid)); SendClientMessage(playerid, AzulClaro, string); format(string, sizeof(string), "* Has taseado a %s", pName(playerid)); SendClientMessage(issuerid, AzulClaro, string); } }