13.11.2011, 20:28
This displays the message to the user, but I only want it to display if they are NOT in the faction and actually remove them, but it just displays and doesnt remove the player.
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new string[35];
new VSQLID = MySQL_GetValue(vehicleid, "id", "factionvehicles");
vehicleid = GetPlayerVehicleID(playerid);
VehicleFaction[vehicleid] = MySQL_GetValue(VSQLID, "Faction", "factionvehicles");
VehicleRank[vehicleid] = MySQL_GetValue(VSQLID, "Rank", "factionvehicles");
format(string, sizeof(string), "%s: Rank %d +", FactionName[VehicleFaction[vehicleid]], VehicleRank[vehicleid]);
if(Faction[playerid] != VehicleFaction[vehicleid] || FRank[playerid] >= VehicleRank[vehicleid])
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOUR_GREY, string);
return 1;
}


