08.07.2013, 13:57
I use strcmp commands in my gamemode and when i time for explample /lcmds, the server says that the command was unknown.
I put return 0; at the end of OnPlayerCommandText and return 1; after the cmd. Here is the code:
I put return 0; at the end of OnPlayerCommandText and return 1; after the cmd. Here is the code:
pawn Код:
if(strcmp(cmd, "/lcmds", true) == 0) {
if(PlayerInfo[playerid][Level] > 0)
{
SendClientMessage(playerid,blue," ---= [ Most Useful Admin Commands ] ==---");
SendClientMessage(playerid,lightblue,"GENERAL: getinfo, lmenu, announce, write, miniguns, richlist, lspec(off), move, lweaps, adminarea, countdown, duel, giveweapon");
SendClientMessage(playerid,lightblue,"GENERAL: slap, burn, warn, kick, ban, explode, jail, freeze, mute, crash, ubound, god, godcar, ping");
SendClientMessage(playerid,lightblue,"GENERAL: setping, lockserver, enable/disable, setlevel, setinterior, givecar, jetpack, force, spawn");
SendClientMessage(playerid,lightblue,"VEHICLE: flip, fix, repair, lockcar, eject, ltc, car, lcar, lbike, lplane, lheli, lboat, lnos, cm");
SendClientMessage(playerid,lightblue,"TELE: goto, gethere, get, teleplayer, ltele, vgoto, lgoto, moveplayer");
SendClientMessage(playerid,lightblue,"SET: set(cash/health/armour/gravity/name/time/weather/skin/colour/wanted/templevel)");
SendClientMessage(playerid,lightblue,"SETALL: setall(world/weather/wanted/time/score/cash)");
SendClientMessage(playerid,lightblue,"ALL: giveallweapon, healall, armourall, freezeall, kickall, ejectall, killall, disarmall, slapall, spawnall");
}
return 1;
}