[HELP] PlayerScore & Vehicule
#6

Quote:
Originally Posted by [AC
Etch ]
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if(GetPlayerScore(playerid) < 1) 
	{
		new vehicleid = GetPlayerVehicleID(playerid);
		new modelid = GetVehicleModel(vehicleid);
		if(newkeys == 2 || newkeys == 3)
		{
  		if(modelid == 420) // 420 is the taxi model
			{
				RemovePlayerFromVehicle(playerid);
				SendClientMessage(playerid,0xFF9900AA, "You Don't Have 1 Score To Get In A Taxi");
			}
		}
	}
return 1;
}
that will make if a player doesnt have score 1 or plus he get removed from the taxi
OnPlayerKeyStateChange, WHAT?!?!


_________________________________________________


pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(GetVehicleModel(vehicleid) == 420 && GetPlayerScore(playerid) < 1) // Change 1 To what you want..
    {
        SendClientMessage(playerid, 0xFF0000FF, "You don't have the requiered Score to Use this!");
            new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerid, X,Y,Z);
        SetPlayerPos(playerid, X,Y,Z);
    }
    // more code...
}
or the alternative:


pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    new vehicle = GetPlayerVehicleID(playerid));
    if(newstate == PLAYER_STATE_DRIVER && GetVehicleModel(vehicle) == 420)
    {
        if(GetPlayerScore(playerid) < 1) return SendClientMessage(playerid, 0xFF0000FF, "You don't have the necessary Score to use this");
    }
    // more code
}

Reply


Messages In This Thread
[HELP] PlayerScore & Vehicule - by Smiths - 01.03.2010, 19:23
Re: [HELP] PlayerScore &amp; Vehicule - by aircombat - 01.03.2010, 19:29
Re: [HELP] PlayerScore & Vehicule - by Smiths - 01.03.2010, 19:37
Re: [HELP] PlayerScore & Vehicule - by MrIncredible - 01.03.2010, 19:47
Re: [HELP] PlayerScore &amp; Vehicule - by aircombat - 01.03.2010, 19:50
Re: [HELP] PlayerScore & Vehicule - by CuervO - 01.03.2010, 19:50
Re: [HELP] PlayerScore & Vehicule - by MrIncredible - 01.03.2010, 19:52
Re: [HELP] PlayerScore & Vehicule - by Smiths - 01.03.2010, 19:58

Forum Jump:


Users browsing this thread: 6 Guest(s)