how to make a command to add any vehicle?
#8

Easiest way:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp("/car", cmdtext, true, 4))
    {
        new vehicle = strval(cmdtext[5]);
        if(vehicle < 400 || vehicle > 611) return SendClientMessage(playerid, 0xFFFFFFFF, "Error: invalid vehicle id");
        new Float:x, Float:y, Float:z, Float:a;
        GetPlayerPos(playerid, x, y, z);
        GetPlayerFacingAngle(playerid, a);
        CreateVehicle(vehicle, x+2,y+2,z,a,-1,-1,-1);
        return 1;
    }
    return 0;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)