12.08.2009, 01:16
How would I make it so when a player enters a vehicle they have a 1 out of 5 chance to get wanted?
Thanks.
Thanks.
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
new rLevel = random(5);
switch(rLevel)
{
case 1:
{
SetPlayerWantedLevel(playerid, random(5));
}
case 2..4:
{
}
}
}
return 1;
}
public OnPlayerStateChange ( playerid , newstate , oldstate )
{
if ( newstate == PLAYER_STATE_DRIVER )
{
if ( GetPlayerWantedLevel ( playerid ) == 0 )
{
if ( random ( 5 ) == 1 )
{
SetPlayerWantedLevel ( playerid , 1 );
}
}
}
return 1;
}