Warnings
#1

I want it so bikes arent allowed to use this command
i got this but i get warnings

pawn Код:
if(GetVehicleModel(vehicleid) == 522,509,481,510,462,448,581,461,521,523,463,586,468) return SendClientMessageEx(playerid, COLOR_REALRED, "You cant add rims/wheels to an bike/motorbike!");
Код:
warning 206: redundant test: constant expression is non-zero
The warnings is that code
Reply
#2

pawn Код:
switch( GetVehicleModel(vehicleid) )
{
    case 522,509,481,510,462,448,581,461,521,523,463,586,468:
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "You cant add rims/wheels to an bike/motorbike!");
    }
}
Reply
#3

Quote:
Originally Posted by IceBilizard
Посмотреть сообщение
pawn Код:
switch( GetVehicleModel(vehicleid) )
{
    case 522,509,481,510,462,448,581,461,521,523,463,586,468:
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "You cant add rims/wheels to an bike/motorbike!");
    }
}
This works but it still opens the dialog but it displays the msg though

So i still need help

pawn Код:
CMD:rims(playerid, params[])
{
    new vehicleid = GetPlayerVehicleID(playerid);
    if(PlayerInfo[playerid][pAdmin] < 3) return SendClientMessageEx(playerid, COLOR_GREY, "You are not authorized to use that command !");
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_REALRED,"You're not in a vehicle.");
    switch( GetVehicleModel(vehicleid) )
    {
        case 522,509,481,510,462,448,581,461,521,523,463,586,468:
        {
            SendClientMessage(playerid, 0xFFFFFFFF, "You cant add rims/wheels to an bike/motorbike!");
        }
    }
    ShowPlayerDialog(playerid, DIALOG_RIMS, DIALOG_STYLE_LIST, "Rims/Wheels", "Shadow\nMega\nRimshine\nWires\nClassic\nTwist\nCutter\nSwitch\nGrove\nImport\nDollar\nTrance\nAtomic", "Select", "Cancel");
    return 1;
}
Reply
#4

try this one

pawn Код:
CMD:rims(playerid, params[])
{
    new vehicleid = GetPlayerVehicleID(playerid);
    new vehiclemodel = GetVehicleModel( vehicleid );
    if(PlayerInfo[playerid][pAdmin] < 3) return SendClientMessageEx(playerid, COLOR_GREY, "You are not authorized to use that command !");
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_REALRED,"You're not in a vehicle.");
    if( vehiclemodel == 522 || vehiclemodel == 509 || vehiclemodel == 481 || vehiclemodel == 510 || vehiclemodel == 462 || vehiclemodel == 581 || vehiclemodel == 461 || vehiclemodel == 521  || vehiclemodel == 463  || vehiclemodel == 586  || vehiclemodel == 468)
    {
            SendClientMessage(playerid, 0xFFFFFFFF, "You cant add rims/wheels to an bike/motorbike!");    
    }
    else
   {
    ShowPlayerDialog(playerid, DIALOG_RIMS, DIALOG_STYLE_LIST, "Rims/Wheels", "Shadow\nMega\nRimshine\nWires
\nClassic\nTwist\nCutter\nSwitch\nGrove\nImport\nDollar\nTrance\nAtomic"
, "Select", "Cancel");
    return 1;
   }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)