Car Respawn[rep] - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Car Respawn[rep] (
/showthread.php?tid=324430)
Car Respawn[rep] -
Dan_Barocu - 09.03.2012
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.
Re: Car Respawn[rep] -
Kingunit - 09.03.2012
Past your OnPlayerExitVehicle.
Re: Car Respawn[rep] -
Dan_Barocu - 09.03.2012
Here:
PHP код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
new pName[24];
GetPlayerName(playerid, pName, 24);
if(PlayerInfo[playerid][pSeatBelt] == 1)
{
PlayerInfo[playerid][pSeatBelt] = 0;
new stringtosee[255];
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
new ftext[255];
if(PlayerInfo[playerid][pSex] == 1)
{
ftext = "his";
}
else if(PlayerInfo[playerid][pSex] == 1)
{
ftext = "her";
}
format(stringtosee, sizeof(stringtosee), "* %s unbuckles %s seat belt", sendername , ftext);
ProxDetector(30.0, playerid, stringtosee, 0xC2A2DAAA,0xC2A2DAAA,0xC2A2DAAA,0xC2A2DAAA,0xC2A2DAAA);
return 1;
}
return 1;
}
i put this..
PHP код:
forward IsACopCar(carid);
PHP код:
public IsACopCar(carid)
{
for(new i = 0; i < sizeof(copcar); i++)
{
if(carid == copcar[i]) return 1;
}
return 0;
}
Re: Car Respawn[rep] -
Dan_Barocu - 11.03.2012
anybody please??
AW: Car Respawn[rep] -
Nero_3D - 11.03.2012
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.
Re: Car Respawn[rep] -
eesh - 11.03.2012
Search for a SetVehicleToRespawn under OnPlayerStateChange and remove it.
Re: Car Respawn[rep] -
Dan_Barocu - 11.03.2012
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??
Re: Car Respawn[rep] -
eesh - 11.03.2012
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;
}
Re: Car Respawn[rep] -
Dan_Barocu - 11.03.2012
Lock Topic i posted a diffrent topic !!!!!