SA-MP Forums Archive
Command not recognized - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Command not recognized (/showthread.php?tid=478632)



Command not recognized - Mitchy - 30.11.2013

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;
    }



Re: Command not recognized - Mitchy - 30.11.2013

Anyone? Really needing this solved sorry for bumping


Re: Command not recognized - Konstantinos - 30.11.2013

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;
}



Re: Command not recognized - Mitchy - 30.11.2013

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


Re: Command not recognized - Lajko1 - 30.11.2013

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


Re: Command not recognized - Mitchy - 30.11.2013

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.


Re: Command not recognized - Mitchy - 01.12.2013

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


Re: Command not recognized - Mitchy - 02.12.2013

....