Enter vehicles only with certain score
#1

hi,
i just wrote down some code lines that shall prevent the use of vehicles to all players with a score lower than 50.
But its bugged up
Well for me it works but if therre are more players online it just doesnt work. The ClientMessage is always displayed right but the ejection system does not work correctly.

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new ValidScore;

ValidScore = GetPlayerScore(playerid);
if(ValidScore > 50)
{
SendClientMessage(playerid,0xAA3333AA,"{76EEC6}Drive {283A90}carefully.");
}
else
{
SetTimer("CarEjecter",1000,10);
SendClientMessage(playerid,0xAA3333AA,"{76EEC6}Your Score {551011}is not high enough to drive this {76EEC6}vehicle!");
}


return 1;
}

forward CarEjecter(playerid);
public CarEjecter (playerid)
{
if(GetPlayerState(playerid)==PLAYER_STATE_DRIVER)
{
RemovePlayerFromVehicle(playerid);
}
}
regards...
Reply


Messages In This Thread
Enter vehicles only with certain score - by BlackWolf120 - 10.01.2011, 19:12
Re: Enter vehicles only with certain score - by [BEP]AcerPilot - 10.01.2011, 19:18
Re: Enter vehicles only with certain score - by BlackWolf120 - 10.01.2011, 19:25
Re: Enter vehicles only with certain score - by boelie - 10.01.2011, 19:26
Re: Enter vehicles only with certain score - by BlackWolf120 - 10.01.2011, 19:27
AW: Enter vehicles only with certain score - by Kmitska - 10.01.2011, 19:30
Re: Enter vehicles only with certain score - by BlackWolf120 - 10.01.2011, 19:34
Re: Enter vehicles only with certain score - by [BEP]AcerPilot - 10.01.2011, 19:51
Re: Enter vehicles only with certain score - by boelie - 10.01.2011, 19:53
Re: Enter vehicles only with certain score - by BlackWolf120 - 10.01.2011, 20:14

Forum Jump:


Users browsing this thread: 5 Guest(s)