Help Please: Server Unknown Commands -
alynutzj2p - 31.07.2011
For a while it gives me error Server Unknown command, without knowing why this error gives me the commands I went in front on / respawnallcars, go and have to give restart the server, but after a while and I this error occurs. Maybe I could help, Thanks
Re: Help Please: Server Unknown Commands -
emokidx - 31.07.2011
i dont really understand you..
you should make a command before using it o.O
Re: Help Please: Server Unknown Commands -
alynutzj2p - 31.07.2011
When I / respawnallcars gives me this error "SERVER: Unknown command", but i have command in GM (/respawnallcars), to recover should give restart, but after a while and gives me this error!
Re: Help Please: Server Unknown Commands -
Libra_PL - 31.07.2011
Are you using dcmd? If yes, the problem is wrong characters command number (happened if number is wrong).
Re: Help Please: Server Unknown Commands -
alynutzj2p - 31.07.2011
That command
pawn Code:
if(strcmp(cmd, "/respawnallcars", true) == 0 || strcmp(cmd, "/rac", true) == 0) //
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] < 3)
{
SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
return 1;
}
new bool:unwanted[CAR_AMOUNT];
for(new player=0; player<MAX_PLAYERS; player++)
{
if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
}
for(new car = 1; car <= 207; car++)
{
if(!unwanted[car]) SetVehicleToRespawn(car);
}
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "SERVER: All unused cars respawned by %s.", sendername);
BroadCast(COLOR_WHITE,string);
}
return 1;
}
Re: Help Please: Server Unknown Commands -
Sneaky_ - 07.07.2015
Try using that:
Code:
if(strcmp(cmd, "/respawnallcars", true) == 0 || strcmp(cmd, "/rac", true) == 0) //
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] < 3)
{
SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
return 1;
}
new bool:unwanted[CAR_AMOUNT];
for(new player=0; player<MAX_PLAYERS; player++)
{
if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
}
for(new car = 1; car <= 207; car++)
{
if(!unwanted[car]) SetVehicleToRespawn(car);
}
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "SERVER: All unused cars respawned by %s.", sendername);
BroadCast(COLOR_WHITE,string);
}
return 1;
}
Re: Help Please: Server Unknown Commands -
Sergei - 07.07.2015
You can also get that error, if array is out of bounds.