Code Doesnt Work
#1

This dont work i wanted it so the car ids there dont let you drive but anythin else than that lets you drive so i tested drivign the nrg but it still lets me drive

http://pastebin.com/m6d70d6fb

Quote:

new carid = GetPlayerVehicleID(playerid);
if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER && gTeam[playerid] == TEAM_PRES)
{
if(carid == 592 || carid == 577 || carid == 511 || carid == 512 || carid == 593 || carid == 520 || carid == 553 || carid == 476 || carid == 460 || carid == 513 || carid == 548 || carid == 525 || carid == 417 || carid == 487 || carid == 488 || carid == 497 || carid == 563 || carid == 447 || carid == 469 || carid == 522)
{
SendClientMessage(playerid,COLOR_LIGHTGREEN,"You cannot drive while you are The President. You have been removed");
RemovePlayerFromVehicle(playerid);
}
else
{

}
}

Reply
#2

GetPlayerVehicleID gets the ID of the vehicle, you look like you're trying to restrict models, you need to use GetVehicleModel for that!

Example:

http://pastebin.com/m702ec0c
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)