10.02.2013, 20:34
So I have a problem on player enters vehicle.. Message doesn't shows up.
I tryed difrent ways but still nothing.. I really need some help..
Here is the code:
Compiles without warnings and errors..
I tryed difrent ways but still nothing.. I really need some help..
Here is the code:
pawn Код:
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;
}