#6

Use PLEOMAX'S pvehicle include.

The code can be like this if you're using that include:

pawn Код:
CMD:v(playerid, params[])
{
    new vname[20];
    new cString[80];
    if(IsPlayerInDM[playerid] == No)
    {
        if(!sscanf(params,"s[20]",vname))
        {
            if(!IsPlayerInAnyVehicle(playerid))
            {
                CreateVehicleForPlayer(playerid, vname, -1, -1, 1000.0);
                format(cString,sizeof(cString), "You spawned a %s for yourself! " , vname);
                SendClientMessage(playerid, SKYBLUE, cString);
            }
            else SendClientMessage(playerid, RED, "ERROR:Already in a vehicle");
        }
        else SendClientMessage(playerid,RED, "[USAGE]:/v [CARNAME/CARID] or /vehicle [CARNAME/CARID]");
    }
    else return SendClientMessage(playerid, RED, "Use /exitdm before using vehicle commands! ");
    return 1;
}
Oh and sorry for the DM thing, kinda copied and pasted from my code.
Reply


Messages In This Thread
/v - by thefatshizms - 27.05.2012, 00:34
Re: /v - by MP2 - 27.05.2012, 00:38
Re: /v - by TheDominator - 27.05.2012, 00:40
Re: /v - by thefatshizms - 27.05.2012, 00:45
Re: /v - by Edward156 - 27.05.2012, 05:03
Re: /v - by Gangs_Rocks - 27.05.2012, 07:27

Forum Jump:


Users browsing this thread: 1 Guest(s)