Score Vehicle Pass [NEED HELP] - 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: Score Vehicle Pass [NEED HELP] (
/showthread.php?tid=291826)
Score Vehicle Pass [NEED HELP] -
Sting. - 21.10.2011
Ok now, I want to create this. I have put rhino's and hunter's in-game at my server for the army, but I want players with the score 500 or more to use it and If their score is less than 500, they are removed from the Hunter/Tank.How do I do that?
Re: Score Vehicle Pass [NEED HELP] -
austin070 - 21.10.2011
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(GetVehicleModel(vehicleid) == 425 || GetVehicleModel(vehicleid) == 432)
{
if(GetPlayerScore(playerid) < 500)
{
SetVehicleParamsForPlayer(vehicleid, playerid, false, true);
}
}
return 1;
}
Try this.
Re: Score Vehicle Pass [NEED HELP] -
AeroBlast - 21.10.2011
pawn Код:
public OnPlayerStateChange(playerid,newstate,oldstate)
{
if(newstate == PLAYER_STATE_DRIVER && GetVehicleModel(GetPlayerVehicle(playerid)) == 432 || GetVehicleModel(GetPlayerVehicle(playerid)) == 425)
{
if(GetPlayerScore(playerid) < 500)
{
RemovePlayerFromVehicle(playerid);
}
}
return 1;
}
Re: Score Vehicle Pass [NEED HELP] -
austin070 - 21.10.2011
Quote:
Originally Posted by AeroBlast
pawn Код:
public OnPlayerStateChange(playerid,newstate,oldstate) { if(newstate == PLAYER_STATE_DRIVER && GetVehicleModel(GetPlayerVehicle(playerid)) == 432 || GetVehicleModel(GetPlayerVehicle(playerid)) == 425) { if(GetPlayerScore(playerid) < 500) { RemovePlayerFromVehicle(playerid); } } return 1; }
|
Would recommend my way.
Re: Score Vehicle Pass [NEED HELP] -
knackworst - 21.10.2011
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(GetVehicleModel(vehicleid) == 425 || GetVehicleModel(vehicleid) == 432)
{
if(GetPlayerScore(playerid) < 500)
{
TogglePlayerControllable(playerid,0);
TogglePlayerControllable(playerid,1);
}
}
return 1;
}
I prefer that IMHO...
anyways I'll explain what others will do:
1st one will stop the engine for the specific player when they pretty much press the enter button...
2nd one will let the player step out the car right after he entered the car and closed the door
my way will just stop the player from entering when he presses enter...
I think the 2nd one is the most acurate still I prefer my way...
Re: Score Vehicle Pass [NEED HELP] -
[MWR]Blood - 21.10.2011
The best way is either returning 0 or sending a message.