13.08.2010, 11:13
Hello, this is my code:
When i enter the Police, Ambulance, Paramedic etc. vehicle it shows only:
*** You don't have your driving license yet, take care or the Cop will notice.
Instead of You don't have the keys..
What did i do wrong?
Quote:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { new bikes = ( 581, 522, 461, 521, 463, 586, 468, 471 ); new planes = ( 592, 577, 511, 512, 593, 520, 553, 476, 519, 460, 513 ); new boats = ( 472, 473, 493, 595, 484, 430, 453, 452, 446, 454 ); new copfbivehicles = ( 523, 430, 427, 490, 528, 596, 597, 598, 599, 601, 497 ); new ambulancevehicles = ( 416, 487 ); new firevehicles = ( 407, 544 ); if(GetPlayerVehicleID(playerid) == bikes) { if(PlayerInfo[playerid][pDriveLic] == 0) { SendClientMessage(playerid, COLOR_RED, "*** You don't have your driving license yet, take care or the Cops will notice. ((/gps_licensecenter))"); return 1; } } if(GetPlayerVehicleID(playerid) == planes) { if(PlayerInfo[playerid][pFlyLic] == 0) { new Float:X, Float:Y, Float:Z; GetPlayerPos(playerid, X, Y, Z); SetPlayerPos(playerid, X, Y, Z); SendClientMessage(playerid, COLOR_RED, "*** You don't know how to fly yet, get your license at the License Center. ((/gps_licensecenter))"); return 1; } } if(GetPlayerVehicleID(playerid) == boats) { if(PlayerInfo[playerid][pSailLic] == 0) { new Float:X, Float:Y, Float:Z; GetPlayerPos(playerid, X, Y, Z); SetPlayerPos(playerid, X, Y, Z); SendClientMessage(playerid, COLOR_RED, "*** You don't know how to sail yet, get your license at the License Center. ((/gps_licensecenter))"); return 1; } } new model = GetPlayerVehicleID(playerid); if(model != planes && model != boats) { if(PlayerInfo[playerid][pDriveLic] == 0) { SendClientMessage(playerid, COLOR_RED, "*** You don't have your driving license yet, take care or the Cops will notice. ((/gps_licensecenter))"); return 1; } } if(GetPlayerVehicleID(playerid) == copfbivehicles) { if(PlayerInfo[playerid][pFaction] != 1) { new Float:X, Float:Y, Float:Z; GetPlayerPos(playerid, X, Y, Z); SetPlayerPos(playerid, X, Y, Z); SendClientMessage(playerid, COLOR_GRAD4, "*** You don't have the keys for this vehicle. ((COP/FBI))"); return 1; } } if(GetPlayerVehicleID(playerid) == ambulancevehicles) { if(PlayerInfo[playerid][pFaction] != 2) { new Float:X, Float:Y, Float:Z; GetPlayerPos(playerid, X, Y, Z); SetPlayerPos(playerid, X, Y, Z); SendClientMessage(playerid, COLOR_GRAD4, "*** You don't have the keys for this vehicle. ((Medic))"); return 1; } } if(GetPlayerVehicleID(playerid) == firevehicles) { if(PlayerInfo[playerid][pFaction] != 3) { new Float:X, Float:Y, Float:Z; GetPlayerPos(playerid, X, Y, Z); SetPlayerPos(playerid, X, Y, Z); SendClientMessage(playerid, COLOR_GRAD4, "*** You don't have the keys for this vehicle. ((Paramedic))"); return 1; } } return 1; } |
*** You don't have your driving license yet, take care or the Cop will notice.
Instead of You don't have the keys..
What did i do wrong?