Код:
new gsf1
gsf = AddStaticVehicle(Co-ordinates bla bla....)
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
new vehicle;
vehicle = GetPlayerVehicleID(playerid);
if(vehicle == gsf1)
{
if(!strcmp(name, "gsf1", false, 0))
{
SendClientMessage(playerid,COLOR_WHITE, "You Dont Have Key from this vehicle.");
}
}
pawn Код:
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == vehicleid) //change vehicle id
{
SendClientMessage(playerid, Property, "You Dont Have Key for this vehicle.");
}