19.01.2012, 16:42
Buenas, miren estoy arreglando
Para que los que mueran aparezcan en el hospital pero me tira estos errores:
Les dejo los codes, antes me tiraba varios errores y logrй corregir la mayorнa pero estos me pillaron:
pawn Код:
public OnPlayerDeath
Код:
C:\Users\Karim\Desktop\GM Real Second Life RP 0.3d\gamemodes\CiudadMaravilla.pwn(6648) : warning 204: symbol is assigned a value that is never used: "killerteam" C:\Users\Karim\Desktop\GM Real Second Life RP 0.3d\gamemodes\CiudadMaravilla.pwn(6647) : warning 204: symbol is assigned a value that is never used: "victimteam" C:\Users\Karim\Desktop\GM Real Second Life RP 0.3d\gamemodes\CiudadMaravilla.pwn(6641) : warning 203: symbol is never used: "playercash" C:\Users\Karim\Desktop\GM Real Second Life RP 0.3d\gamemodes\CiudadMaravilla.pwn(6641 -- 6699) : warning 209: function "JB_OnPlayerDeath" should return a value C:\Users\Karim\Desktop\GM Real Second Life RP 0.3d\gamemodes\CiudadMaravilla.pwn(6641 -- 6700) : error 010: invalid function or declaration C:\Users\Karim\Desktop\GM Real Second Life RP 0.3d\gamemodes\CiudadMaravilla.pwn(6641 -- 6702) : error 010: invalid function or declaration C:\Users\Karim\Desktop\GM Real Second Life RP 0.3d\gamemodes\CiudadMaravilla.pwn(6641 -- 6707) : error 021: symbol already defined: "JB_SetPlayerPos" C:\Users\Karim\Desktop\GM Real Second Life RP 0.3d\gamemodes\CiudadMaravilla.pwn(6641 -- 6707) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
new name[MAX_PLAYER_NAME];
new string[256];
new playercash;
new victimteam;
new Float:px,Float:py,Float:pz;
new cut;
new killerteam;
TirarArmas(playerid);
victimteam = gTeam[playerid];
killerteam = gTeam[killerid];
Soga[playerid] = 0;
Alambre[playerid] = 0;
Cuchilla[playerid] = 0;
gPlayerSpawned[playerid] = 0;
PlayerInfo[playerid][pCinturon] = 0;
AirRoute[playerid] = 0;
TrainRoute[playerid] = 0;
PractisingCar[playerid] = 0;
PlayerInfo[playerid][pInvWeapon] = 0;
PlayerInfo[playerid][pInvAmmo] = 0;
GetPlayerName(playerid, name, sizeof(name));
PlayerInfo[playerid][pLocal] = 255;
GetPlayerPos(playerid, px, py, pz);
ConCas[playerid] = 0;
LPuestos[playerid] = 0;
if(killerid != 255)
{
if(GetPlayerState(killerid) == 2)
{
if(ProxDetectorS(20, killerid, playerid))
{
if(!IsPlayerInAnyVehicle(playerid))
{
if(PlayerInfo[killerid][pMember] == 1||PlayerInfo[killerid][pLeader] == 1||PlayerInfo[killerid][pMember] == 2||PlayerInfo[killerid][pLeader] ==2)
{
SendClientMessage(killerid, COLOR_YELLOW, "Deja el Drive-By.. ЎPuedes Ser Sancionado por un administrador!.");
return 1;
}
SetPlayerCriminal(killerid,255,"Homicidio tentativo");
SetPlayerWantedLevel(killerid, GetPlayerWantedLevel(killerid)+1);
return 1;
}
}
}
}
if (GetPlayerMoney(playerid) <= 0) cut = deathcost;
else cut = 0;
SafeGivePlayerMoney(playerid, -cut);
format(string, sizeof(string), "Medico: Estabas muy Herido.. Perdiste la Memoria.. Te Cobramos: $%d.", deathcost);
SendClientMessage(playerid, TEAM_CYAN_COLOR, string);
format(string, sizeof(string), "Medico: Te Recuperarбs al 100% Prontontamente");
SendClientMessage(playerid, TEAM_CYAN_COLOR, string);
SetPlayerHealth(playerid, 65.0);
MedicBill[playerid] = 0;
MedicTime[playerid] = 0;
NeedMedicTime[playerid] = 0;
PlayerInfo[playerid][pDeaths] += 1;
PlayerInfo[playerid][pCancer] += 1;
}
if(JustDied[playerid] == 1)
{
if(GetPlayerVirtualWorld(playerid) != 0 || PlayerInfo[playerid][pVirWorld] != 0)
{
SetPlayerVirtualWorld(playerid, 0);
PlayerInfo[playerid][pVirWorld] = 0;
}
SetPlayerPos(playerid, 1182.5638,-1323.5256,13.5790);
SetPlayerFacingAngle(playerid, 270.0);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
return 1;
}
if(PlayerInfo[playerid][pLeader] == 7 || PlayerInfo[playerid][pMember] == 7 )
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1962.2400,-2183.4321,13.5469);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 241;
return 1;
}
if(PlayerInfo[playerid][pLeader] == 19 || PlayerInfo[playerid][pMember] == 19)//Spawn Fuerzas Armadas
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1962.2400,-2183.4321,13.5469);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 241;
return 1;
}
///////////////////////////////
////////////////////////////////
if (PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)//Police Force spawn
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1962.2400,-2183.4321,13.5469);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 241;
return 1;
}
if (PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)//FBI spawn
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1962.2400,-2183.4321,13.5469);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 241;
return 1;
}
if (PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)//San Fierro Police spawn
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1962.2400,-2183.4321,13.5469);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 241;
return 1;
}
if (PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)//Departament Medical LS
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1962.2400,-2183.4321,13.5469);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 241;
return 1;
}
if (PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5) //Sureсos spawn
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1962.2400,-2183.4321,13.5469);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 241;
return 1;
}
if (PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)//La Cosa Nostra spawn
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1962.2400,-2183.4321,13.5469);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 241;
return 1;
}
if (PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8) //EPSI spawn
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1962.2400,-2183.4321,13.5469);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 241;
return 1;
}
if (PlayerInfo[playerid][pMember] == 20 || PlayerInfo[playerid][pLeader] == 20) // Bomberos spawn
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1962.2400,-2183.4321,13.5469);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 241;
return 1;
}
if (PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9) //News CNN spawn
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1962.2400,-2183.4321,13.5469);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 241;
return 1;
}
if (PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10) //Mecanicos Spawn LS
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1962.2400,-2183.4321,13.5469);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 241;
return 1;
}
if (PlayerInfo[playerid][pMember] == 26 || PlayerInfo[playerid][pLeader] == 26) //Mecanicos Spawn SF
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1962.2400,-2183.4321,13.5469);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 241;
return 1;
}
if (PlayerInfo[playerid][pMember] == 27 || PlayerInfo[playerid][pLeader] == 27) //Antrax
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1962.2400,-2183.4321,13.5469);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 241;
return 1;
}
if (PlayerInfo[playerid][pMember] == 17 || PlayerInfo[playerid][pLeader] == 17) //Latin Kings Gang Spawn
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1962.2400,-2183.4321,13.5469);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 241;
return 1;
}
if (PlayerInfo[playerid][pMember] == 18 || PlayerInfo[playerid][pLeader] == 18) //ballas spawn
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1962.2400,-2183.4321,13.5469);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 241;
return 1;
}
//////////////////////////////////////////Licencieros
if(IsAnInstructor(playerid) || PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11) //Driving/Flying School spawn
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1962.2400,-2183.4321,13.5469);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 241;
return 1;
}
//////////////////////////////////////////
if (PlayerInfo[playerid][pMember] == 30 || PlayerInfo[playerid][pLeader] == 30)//Las venturas mafia
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1962.2400,-2183.4321,13.5469);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 241;
return 1;
}
//////////////////////////////////////////////////////////////
if (PlayerInfo[playerid][pMember] == 31 || PlayerInfo[playerid][pLeader] == 31)//Corleon
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1962.2400,-2183.4321,13.5469);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 241;
return 1;
}
////////////////////////////////////////////////////////////////////
if (PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12)//Russian Maffya Spawn
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1962.2400,-2183.4321,13.5469);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 241;
return 1;
}
if (PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13)//Traidas San Fierro
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1962.2400,-2183.4321,13.5469);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 241;
return 1;
}
if (PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14)//Yakuza spawn
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1962.2400,-2183.4321,13.5469);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 241;
return 1;
}
if (PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)//Groove Streets
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1962.2400,-2183.4321,13.5469);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 241;
return 1;
}
if (PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 16)//Departament Medical SF
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1962.2400,-2183.4321,13.5469);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 241;
return 1;
}
if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11) //Taxis
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1962.2400,-2183.4321,13.5469);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 241;
return 1;
}
if(PlayerInfo[playerid][pMember] == 21 || PlayerInfo[playerid][pLeader] == 21) //Spawn Xstreyaton
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1962.2400,-2183.4321,13.5469);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 241;
return 1;
}
if(PlayerInfo[playerid][pMember] == 22 || PlayerInfo[playerid][pLeader] == 22) //barzini
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1962.2400,-2183.4321,13.5469);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 241;
return 1;
}
if(PlayerInfo[playerid][pMember] == 23 || PlayerInfo[playerid][pLeader] == 23) //FARC
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1962.2400,-2183.4321,13.5469);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 241;
return 1;
}
if(PlayerInfo[playerid][pMember] == 24 || PlayerInfo[playerid][pLeader] == 24) //CartelRed
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1962.2400,-2183.4321,13.5469);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 241;
return 1;
}
if (PlayerInfo[playerid][pMember] == 28 || PlayerInfo[playerid][pLeader] == 28)//SAJL
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1962.2400,-2183.4321,13.5469);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 241;
return 1;
}
if (gPlayerCheckpointStatus[playerid] > 4 && gPlayerCheckpointStatus[playerid] < 11)
{
DisablePlayerCheckpoint(playerid);
gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
}