Command not recognized
#1

im having trouble with these commands. Can someone please tell me where i've went wrong? I'll +rep you if you can resolve the problem!

pawn Код:
command(respawnvehicles, playerid, params[]) // Respawns EVERY unused vehicle.
    {
        if(Player[playerid][AdminLevel] >= 2)
        {
                for(new i = 1; i < MAX_VEHICLES; i++)
                {
                    if(!IsVehicleOccupied(i))
                    {
                        SetVehicleToRespawn(i);
                    }
                }
        }
        else return SendClientMessage(playerid, GREY, "You are not a high enough administrator rank to use this command.");
        return 1;
    }
   
    command(frespawnvehicles, playerid, params[]) // Respawns EVERY unused faction vehicle
    {
        if(Player[playerid][Faction] != 0)
        {
            if(Player[playerid][FactionRank] >= 6)
            {
                 for(new i = 1; i < MAX_VEHICLES; i++)
                 {
                    if(!IsVehicleOccupied(i))
                    {
                        SetVehicleToRespawn(VehicleFaction[i]);
                    }
                 }
            }
            else return SendClientMessage(playerid, GREY, "You are not a high enough rank in your faction to use this command.");
        }
        else return SendClientMessage(playerid, GREY, "You are not in a faction.");
        return 1;
    }
Reply
#2

Anyone? Really needing this solved sorry for bumping
Reply
#3

Make sure that you use only ZCMD in that script for the commands.

pawn Код:
command(respawnvehicles, playerid, params[]) // Respawns EVERY unused vehicle.
{
    if(Player[playerid][AdminLevel] < 2) return SendClientMessage(playerid, GREY, "You are not a high enough administrator rank to use this command.");
    for(new i = 1; i < MAX_VEHICLES; i++)
    {
        if(!IsVehicleOccupied(i)) SetVehicleToRespawn(i);
    }
    return 1;
}

command(frespawnvehicles, playerid, params[]) // Respawns EVERY unused faction vehicle
{
    if(!Player[playerid][Faction]) return SendClientMessage(playerid, GREY, "You are not in a faction.");
    if(Player[playerid][FactionRank] < 6) return SendClientMessage(playerid, GREY, "You are not a high enough rank in your faction to use this command.");
    for(new i = 1; i < MAX_VEHICLES; i++)
    {
        if(!IsVehicleOccupied(i)) SetVehicleToRespawn(VehicleFaction[i]);
    }
    return 1;
}
Reply
#4

What do you mean? Can you explain it a bit more in depth please? Cheers just going to test your code.
Reply
#5

You need to have "incude <zcmd>" in your script
and you need to have include zcmd in your pawno/include file.. also
Reply
#6

It's included mate, though these two commands (in particular) are not working. I've re-written the commands and im just going to test them) Cheers for trying to help though mate.
Reply
#7

Can anyone help here? This command aint working at all.
Reply
#8

....
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)