[Ayuda] Spawn de Hospitales !
#1

Esto Me pasa cuando Me muero ............... salgo en el Hospital Pero quedo Congelado Y con Vista al hospital ( ustedes entienden en los servidores RP sales Con Vista al Hospital y no sale el jugador ) y nunca Spawneo

Esto tiene Muchos Hospitales de Spawn y ninguno Sirve pero probare con (/buyinsurance) es como afiliarse al hospital........


Diganme que pasa ? alli veo Definido todo


pawn Код:
HospitalSpawn(playerid)
{
    if(GetPVarInt(playerid, "MedicBill") == 1 && PlayerInfo[playerid][pJailed] == 0)
    {
        if(GetPVarInt(playerid, "Hospital") == 1 && PlayerInfo[playerid][pInsurance] == 2)
        {
            SetPlayerArmour(playerid, PlayerInfo[playerid][pSHealth]);
            SetPlayerHealth(playerid, 50.0);
            DeletePVar(playerid, "MedicBill");
            GivePlayerCash(playerid, -1500);
            SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "DOC: Your Medical Bill comes to $1,500, Have a nice day.");
            SetPlayerPos(playerid, 1175.0586,-1324.2463,14.5938);
            SetPlayerFacingAngle(playerid, 268.9748);
            DeletePVar(playerid, "Hospital");
            SetCameraBehindPlayer(playerid);
            TogglePlayerControllable(playerid, 1);


pawn Код:
public OnPlayerSpawn(playerid)
{


    /*if(IsPlayerNPC(playerid))
    {
        new npcname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, npcname, sizeof(npcname));
        if(!strcmp(npcname, "Bus_Driver", true))
        {
            PutPlayerInVehicle(playerid, BusDriverVehicle, 0);
        }
        if(!strcmp(npcname, "Bus_Driver2", true))
        {
            PutPlayerInVehicle(playerid, BusDriverVehicle2, 0);
            return 1;
        }
        return 1;
    }*/

    if(!gPlayerLogged{playerid} && !restarting)
    {
        SendClientMessageEx(playerid, COLOR_WHITE, "ERROR: You are not logged in!");
        Kick(playerid);
        return 1;
    }

    ////if(EstaAutorizado[playerid] == true)
    //{SendClientMessageEx(playerid, COLOR_WHITE, ""OFICIAL_COLOR"((WS-Security:)){FFFFFF}Authorized Access to Internal Server System. Welcome.");}

    Streamer_Update(playerid);
    if(GetPVarInt(playerid, "NGPassenger") == 1)
    {
        new Float:X, Float:Y, Float:Z;
        GetVehiclePos(GetPVarInt(playerid, "NGPassengerVeh"), X, Y, Z);
        SetPlayerPos(playerid, (X-2.557), (Y-3.049), Z);
        SetPlayerWeaponsEx(playerid);
        GivePlayerValidWeapon(playerid, 46, 60000);
        SetPlayerSkin(playerid, GetPVarInt(playerid, "NGPassengerSkin"));
        SetPlayerHealth(playerid, GetPVarFloat(playerid, "NGPassengerHP"));
        SetPlayerArmour(playerid, GetPVarFloat(playerid, "NGPassengerArmor"));
        DeletePVar(playerid, "NGPassenger");
        DeletePVar(playerid, "NGPassengerVeh");
        DeletePVar(playerid, "NGPassengerArmor");
        DeletePVar(playerid, "NGPassengerHP");
        DeletePVar(playerid, "NGPassengerSkin");
        return 1;
    }
    if(InsideShamal[playerid] != INVALID_VEHICLE_ID)
    {
        SetPlayerPos(playerid, GetPVarFloat(playerid, "air_Xpos"), GetPVarFloat(playerid, "air_Ypos"), GetPVarFloat(playerid, "air_Zpos"));
        SetPlayerFacingAngle(playerid, GetPVarFloat(playerid, "air_Rpos"));
        SetPlayerHealth(playerid, GetPVarFloat(playerid, "air_HP"));
        SetPlayerArmour(playerid, GetPVarFloat(playerid, "air_Arm"));
        SetPlayerWeaponsEx(playerid);
        SetPlayerToTeamColor(playerid);
        SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);

        DeletePVar(playerid, "air_Xpos");
        DeletePVar(playerid, "air_Ypos");
        DeletePVar(playerid, "air_Zpos");
        DeletePVar(playerid, "air_Rpos");
        DeletePVar(playerid, "air_HP");
        DeletePVar(playerid, "air_Arm");

        SetCameraBehindPlayer(playerid);
        SetPlayerVirtualWorld(playerid, InsideShamal[playerid]);
        return SetPlayerInterior(playerid, 1);
    }
    SyncPlayerTime(playerid);
    SetPlayerWantedLevel(playerid, PlayerInfo[playerid][pWantedLevel]);
    STDPlayer[playerid] = 0;
    gTeam[playerid] = PlayerInfo[playerid][pTeam];

    if(!gPlayerLogged{playerid} && !restarting) return Kick(playerid);

    SetPlayerSpawn(playerid);
    SetPlayerWeapons(playerid);
    SetPlayerToTeamColor(playerid);


    CheckPH(playerid);
    SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 1);
    SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 1);

    TextDrawShowForPlayer(playerid, WS);
    TextDrawShowForPlayer(playerid, MeneralGamingpoint);
    TextDrawShowForPlayer(playerid, MeneralGaming);

    return 1;
}

stock RegisterVehicleNumberPlate(vehicleid, sz_NumPlate[]) {
    new
        Float: a_CarPos[4], Float: fuel; // X, Y, Z, Z Angle, Fuel

    GetVehiclePos(vehicleid, a_CarPos[0], a_CarPos[1], a_CarPos[2]);
    GetVehicleZAngle(vehicleid, a_CarPos[3]);
    fuel = VehicleFuel[vehicleid];
    SetVehicleNumberPlate(vehicleid, sz_NumPlate);
    SetVehicleToRespawn(vehicleid);
    SetVehiclePos(vehicleid, a_CarPos[0], a_CarPos[1], a_CarPos[2]);
    SetVehicleZAngle(vehicleid, a_CarPos[3]);
    VehicleFuel[vehicleid] = fuel;
    return 1;
}

Log(sz_fileName[], sz_input[]) {

    new
        sz_logEntry[156],
        i_dateTime[2][3],
        File: fileHandle = fopen(sz_fileName, io_append);

    gettime(i_dateTime[0][0], i_dateTime[0][1], i_dateTime[0][2]);
    getdate(i_dateTime[1][0], i_dateTime[1][1], i_dateTime[1][2]);

    format(sz_logEntry, sizeof(sz_logEntry), "[%i/%i/%i - %i:%i:%i] %s\r\n", i_dateTime[1][0], i_dateTime[1][1], i_dateTime[1][2], i_dateTime[0][0], i_dateTime[0][1], i_dateTime[0][2], sz_input);
    fwrite(fileHandle, sz_logEntry);
    return fclose(fileHandle);
}

Creo que ese es OnPlayerSPawn


Esto es otra cosa que ayudaria creo que es el Problema ya que eso Debe salir cuando sales del Hospital "Que tengas un Bonito Dia" osea "Nice Day"

pawn Код:
if(GetPVarInt(playerid, "MedicBill") == 1 && PlayerInfo[playerid][pJailed] == 0)
        {
            SendClientMessageEx( playerid, TEAM_CYAN_COLOR, "Before you are discharged, hospital staff will confiscate your weapons." );
            PlayerInfo[playerid][pDuty] = 0;
            PlayerInfo[playerid][pVW] = 0;
            PlayerInfo[playerid][pInt] = 0;
            SetPlayerVirtualWorld(playerid, 0);
            new cut = deathcost; PlayerInfo[playerid][pLevel]*deathcost;
            GivePlayerCash(playerid, -cut);
            format(string, sizeof(string), "DOC: Your Medical Bill comes to $%d, Have a nice day.", cut);
            SendClientMessageEx(playerid, TEAM_CYAN_COLOR, string);*/
            ResetPlayerWeapons(playerid);

            if( GetPVarInt( playerid, "EventToken" ) == 1 )
            {
                //SendClientMessageEx( playerid, COLOR_WHITE, "As you've just come from an event, your weapons have been refunded." );
            }
            else
            {

ACA LOS ERRORES CREO QUE HAY QUE CAMBIAR EL "new"

Quote:

.pwn(10641) : warning 215: expression has no effect
.pwn(10643) : error 017: undefined symbol "string"
pwn(10643) : error 017: undefined symbol "string"
pwn(10643) : error 029: invalid expression, assumed zero
.pwn(10643) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

Ayъdenme por favor !!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)