public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new CarCheck = GetPlayerVehicleID(playerid);
if(CarCheck == Cars[GroveStreet])
{
if (Group_GetPlayer(gGSF, playerid)) // Can use the car.
{
SendClientMessage(playerid, COLOR_RED, "* %s spins a key and tries to start vehicle engine.");
}
else
{
SendClientMessage(playerid, COLOR_RED, "You aren't in team Grove Street Crips");
RemovePlayerFromVehicle(playerid);
}
return 1;
}
if(CarCheck == Cars[SevileCrips])
{
if (Group_GetPlayer(gSBF, playerid)) // Can use the car.
{
SendClientMessage(playerid, COLOR_RED, "* %s spins a key and tries to start vehicle engine.*");
}
else
{
SendClientMessage(playerid, COLOR_RED, "You aren't in team Sevile Beach Crips");
RemovePlayerFromVehicle(playerid);
}
return 1;
}
if(CarCheck == Cars[VeronaBeachCrips])
{
if (Group_GetPlayer(gVBF, playerid)) // Can use the car.
{
SendClientMessage(playerid, COLOR_RED, "* %s spins a key and tries to start vehicle engine.*");
}
else
{
SendClientMessage(playerid, COLOR_RED, "You aren't in team Verona Beach Crips");
RemovePlayerFromVehicle(playerid);
}
return 1;
}
if(CarCheck == Cars[TempleDriveCrips])
{
if (Group_GetPlayer(gTDF, playerid)) // Can use the car.
{
SendClientMessage(playerid, COLOR_RED, "* %s spins a key and tries to start vehicle engine.*");
}
else
{
SendClientMessage(playerid, COLOR_RED, "You aren't in team Temple Drive Crips");
RemovePlayerFromVehicle(playerid);
}
return 1;
}
return 1;
}
new CarCheck = GetPlayerVehicleID(playerid)
SendClientMessage(playerid, COLOR_RED, "* %s spins a key and tries to start vehicle engine.*");
[23:51:45] Hooks_OnPlayerKeyStateChange called: 0, 0, 8
[23:51:45] Hooks_OnPlayerUpdate called: 0
[23:51:45] Hooks_OnPlayerUpdate called: 0
[23:51:45] Hooks_OnPlayerUpdate called: 0
[23:51:45] Hooks_OnPlayerUpdate called: 0
[23:51:45] Hooks_OnPlayerUpdate called: 0
[23:51:46] Hooks_OnPlayerUpdate called: 0
[23:51:46] Hooks_OnPlayerUpdate called: 0
[23:51:46] Hooks_OnPlayerUpdate called: 0
[23:51:46] Hooks_OnPlayerUpdate called: 0
[23:51:46] Hooks_OnPlayerUpdate called: 0
[23:51:46] Hooks_OnPlayerUpdate called: 0
[23:51:46] Hooks_OnPlayerUpdate called: 0
[23:51:46] Hooks_OnPlayerUpdate called: 0
[23:51:46] Hooks_OnPlayerUpdate called: 0
[23:51:46] Hooks_OnPlayerUpdate called: 0
[23:51:46] Hooks_OnPlayerUpdate called: 0
[23:51:46] Hooks_OnPlayerUpdate called: 0
[23:51:46] Hooks_OnPlayerUpdate called: 0
[23:51:46] Hooks_OnPlayerUpdate called: 0
[23:51:46] Hooks_OnPlayerUpdate called: 0
[23:51:46] Hooks_OnPlayerDisconnect called: 0, 1
[23:51:46] hook OnPlayerDisconnect called: 0, 1
[23:51:46] YSI_gABITSFunc called: 01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001, -1
[23:51:46] YSI_gABITSFunc called: 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001, 1
[23:51:46] YSI_gABITSFunc called: 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, 127
[23:51:46] [part] Tony_Sentano has left the server (0:1)
new CarCheck = GetPlayerVehicleID(playerid);
new CarCheck = vehicleid;
SendClientMessage(playerid, COLOR_RED, "* %s spins a key and tries to start vehicle engine.
new name_tag[MAX_PLAYER_NAME], string[128] ; GetPlayerName(playerid, name_tag, MAX_PLAYER_NAME); format(string, sizeof string, "* %s spins a key and tries to start the vehicle engine.", name_tag); SendClientMessage(playerid, COLOR_RED, string);
use on player state change
GetPlayerVehicleID returns the curent vehicle INSIDE, u are only entering the vehicle |