Help with /repair and give weapons and spawn vehicle
#7

Yes and the error command I also made the vehicle one and it returns the error command and the invalid vehicle id with nothing in it. Here is that code
pawn Код:
CMD:spawncar(playerid,params[])
{
    if(PlayerInfo[playerid][pAdmin] > 4321)
    {
        new vehicleid,color1,color2,Float:x, Float:y, Float:z,Float:angle;
        if(sscanf(params,"iii",vehicleid,color1,color2)) SendClientMessage(playerid, COLOR_RED, "Usage: /spawncar [vehicle id] [primary color] [secondary color]");
        if (vehicleid < 400 || vehicleid > 611)   return SendClientMessage(playerid,COLOR_RED, "ERROR: This vehicle does not exist!");
        GetPlayerPos(playerid, x, y, z);
        GetPlayerFacingAngle(playerid, angle);
        CreateVehicle(vehicleid, x+3, y, z,angle, color1, color2, -1);
       
    }
    else return SendClientMessage(playerid, COLOR_RED, "You are not Co-Owner or Owner!");
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)