Vehicle help...
#4

This could be done via a command dude.
pawn Код:
CMD:v(playerid,params[])
{
    new vehicle,choice[24];
    if(sscanf(params,"s[24]d",choice,vehicle))
    {
        return SendClientMessage(playerid,-1,"USAGE: /v buy [vehicleid]");
    }
    if(!strcmp(choice,"buy",true)) // If they typed buy after /v
    {
        if(vehicleid == INVALID_VEHICLE_ID) // If the vehicle doesn't exist.
        {
            return SendClientMessage(playerid,-1,"ERROR: Invalid vehicle id");
        }
        else
        {
            CreateVehicle(vehicle/* rest of params go here*/);
            // You would then do all your ownership code here
            return 1;
        }
    }
    // You could add more /v options by doing this
    if(!strcmp(choice,"sell",true))
    {
        //code here
        return 1;
    }
    return 1;
}
Is this that what you were looking for?
Reply


Messages In This Thread
Vehicle help... - by viddo - 13.03.2012, 23:52
Re: Vehicle help... - by ReneG - 13.03.2012, 23:56
Re: Vehicle help... - by viddo - 14.03.2012, 00:11
Re: Vehicle help... - by ReneG - 14.03.2012, 00:19
Re: Vehicle help... - by viddo - 14.03.2012, 12:13

Forum Jump:


Users browsing this thread: 1 Guest(s)