30.01.2012, 10:46
personaly I use this:
different style of scripting
pawn Код:
if(ispr[GetPlayerVehicleID(playerid)] == 1)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
if(PlayerInfo[playerid][Pid] == CarInfo[CarID][Carid] || PlayerInfo[playerid][Vehkey] == CarInfo[CarID][Carid] || PlayerInfo[playerid][Vehkey2] == CarInfo[CarID][Carid] || PlayerInfo[playerid][Vehkey3] == CarInfo[CarID][Carid])
{
SendClientMessage(playerid, COLOR_ORANGE, "Welcome back to your vehicle!");
}
else
{
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
SendClientMessage(playerid, 0x999999AA, "You don't have the key of this vehicle.");
}
}