Car Respawn[rep]
#1

i found a problem after i go out of the car..the car respawns...

so.i go in car then i decide to go outside then the car respawns..after i exit the car... i hope u understand.
Reply
#2

Past your OnPlayerExitVehicle.
Reply
#3

Here:

PHP код:
public OnPlayerExitVehicle(playeridvehicleid)
{
    new 
pName[24];
    
GetPlayerName(playeridpName24);
    if(
PlayerInfo[playerid][pSeatBelt] == 1)
    {
          
PlayerInfo[playerid][pSeatBelt] = 0;
        new 
stringtosee[255];
        new 
sendername[MAX_PLAYER_NAME];
        
GetPlayerName(playeridsendernamesizeof(sendername));
        new 
ftext[255];
        if(
PlayerInfo[playerid][pSex] == 1)
        {
            
ftext "his";
        }
        else if(
PlayerInfo[playerid][pSex] == 1)
        {
            
ftext "her";
        }
        
format(stringtoseesizeof(stringtosee), "* %s unbuckles %s seat belt"sendername ftext);
        
ProxDetector(30.0playeridstringtosee0xC2A2DAAA,0xC2A2DAAA,0xC2A2DAAA,0xC2A2DAAA,0xC2A2DAAA);
         return 
1;
    }
    return 
1;

i put this..

PHP код:
forward IsACopCar(carid); 
PHP код:
    public IsACopCar(carid)
        {
        for(new 
0sizeof(copcar); i++)
        {
        if(
carid == copcar[i])    return 1;
        }
        return 
0;
        } 
Reply
#4

anybody please??
Reply
#5

What respawn time did you set for the vehicles in CreateVehicle / AddStaticVehicleEx ?
If you use AddStaticVehicle, change it to AddStaticVehicleEx.
And set the respawn time to -1 for infinity.
Reply
#6

Search for a SetVehicleToRespawn under OnPlayerStateChange and remove it.
Reply
#7

Fixed.got another problem... where do i edit so if i get an crash it keeps respawning me at the hospital i want if i get crash i get from wherei got crash.get it??
Reply
#8

pawn Код:
new died[MAX_PLAYERS];

public OnPlayerDeath(playerid,killerid,reason)
{
    died[playerid] =1;
    return 1;
}

public OnPlayerSpawn(playerid)
{
    if(died[playerid] == 1)
    {
        SetPlayerPos(playerid,...);//hospital coords...
        died[playerid]=0;
    }
    return 1;
}
Reply
#9

Lock Topic i posted a diffrent topic !!!!!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)