01.03.2010, 19:50
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; } |
_________________________________________________
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...
}
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
}