why this command dont work?
#6

GetVehicleModel takes 1 argument, which is vehicleid. To get the player's vehicleid you would use GetPlayerVehicleID. To get the model of the vehicle that the player is inside, you would use GetVehicleModel(GetPlayerVehicleID(playerid)).
pawn Код:
if(!strcmp(cmdtext,"/selltest"))
    {
        if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 520)
        {
            GivePlayerMoney(playerid,10000);
            SendClientMessage(playerid,COLOR_LIGHTBLUE,"You have sold a vehicle to the shipyard for $10000.");// for $%d
            return 1;
        }
        if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 521)
        {
            GivePlayerMoney(playerid,11000);
            SendClientMessage(playerid,COLOR_LIGHTBLUE,"You have sold a vehicle to the shipyard for $11000.");// for $%d
            return 1;
        }
        return 1;
    }
Reply


Messages In This Thread
why this command dont work? - by Admigo - 01.11.2011, 16:15
Re: why this command dont work? - by DaBeezy - 01.11.2011, 16:19
Re: why this command dont work? - by Admigo - 01.11.2011, 16:32
Re: why this command dont work? - by Vetle - 01.11.2011, 16:36
Re: why this command dont work? - by Admigo - 01.11.2011, 16:56
Re: why this command dont work? - by Vetle - 01.11.2011, 17:08

Forum Jump:


Users browsing this thread: 4 Guest(s)