Quote:
Originally Posted by CueЯvo
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 }
|
Thank you ! it work great!