06.06.2010, 13:43
I have an admin system installed, and all done. What is the PAWN code, so if someone typed "/adcdms" as atleast level 1 admin, they get a list? I would list all the commands, I just need the code. Thanks
Originally Posted by ThaKing
I have an admin system installed, and all done. What is the PAWN code, so if someone typed "/adcdms" as atleast level 1 admin, they get a list? I would list all the commands, I just need the code. Thanks
|
if(strcmp("/acmds", cmdtext, true, 10) == 0) { if(pAdminLvl[playerid] > 1) { SendClientMessage(playerid, 0xFFFFFFFF, "[ADMINCMD]: /bla /bla /bla"); SendClientMessage(playerid, 0xFFFFFFFF, "[ADMINCMD]: /bla /bla /bla"); SendClientMessage(playerid, 0xFFFFFFFF, "[ADMINCMD]: /bla /bla /bla"); SendClientMessage(playerid, 0xFFFFFFFF, "[ADMINCMD]: /bla /bla /bla"); return 1; } } return SendClientMessage(playerid, 0xFFFFFFFF, "You are not a admin!"); } |
if(strcmp("/acmds", cmdtext, true, 10) == 0)
{
if(pAdminLvl[playerid] >= 1)
{
SendClientMessage(playerid, 0xFFFFFFFF, "[ADMINCMD]: /bla /bla /bla");
SendClientMessage(playerid, 0xFFFFFFFF, "[ADMINCMD]: /bla /bla /bla");
SendClientMessage(playerid, 0xFFFFFFFF, "[ADMINCMD]: /bla /bla /bla");
SendClientMessage(playerid, 0xFFFFFFFF, "[ADMINCMD]: /bla /bla /bla");
}
else return SendClientMessage(playerid, 0xFFFFFFFF, "You are not a admin!");
}
Originally Posted by Ihsan_Cingisiz
Something like this?
Quote:
|
Originally Posted by [SAG
$KingCory$ ]
Quote:
|
\GTA\SAMPSERV\filterscripts\SeifAdmin.pwn(830) : warning 217: loose indentation \GTA\SAMPSERV\filterscripts\SeifAdmin.pwn(832) : error 017: undefined symbol "pAdminLvl" \GTA\SAMPSERV\filterscripts\SeifAdmin.pwn(832) : warning 215: expression has no effect \GTA\SAMPSERV\filterscripts\SeifAdmin.pwn(832) : error 001: expected token: ";", but found "]" \GTA\SAMPSERV\filterscripts\SeifAdmin.pwn(832) : error 029: invalid expression, assumed zero \GTA\SAMPSERV\filterscripts\SeifAdmin.pwn(832) : fatal error 107: too many error messages on one line
if(strcmp(cmd, "/adgoto", true) == 0) // Teleports to a player { new Float:pX,Float:pY,Float:pZ; if (AccountInfo[playerid][AdminLevel] >= 1 || IsPlayerAdmin(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, ORANGE, "USAGE: /adgoto [playername/id]"); SendClientMessage(playerid, ORANGE, "FUNCTION: Will teleport to the specified player."); return 1; } new giveplayerid = ReturnUser(tmp); if(giveplayerid != INVALID_PLAYER_ID) { if (GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { GetPlayerPos(giveplayerid,pX,pY,pZ); SetVehiclePos(GetPlayerVehicleID(playerid),pX,pY,pZ+2); } else { GetPlayerPos(giveplayerid,pX,pY,pZ); SetPlayerPos(playerid,pX,pY,pZ+2); } SetPlayerInterior(playerid,GetPlayerInterior(giveplayerid)); } else if(giveplayerid == INVALID_PLAYER_ID) { format(string, sizeof(string), "%d is not an active player.", giveplayerid); SendClientMessage(playerid, RED, string); } } else SendClientMessage(playerid, RED, "You are not an admin with the required level."); return 1; }
if(strcmp("/acmds", cmdtext, true, 10) == 0) { if(AccountInfo[playerid][AdminLevel] >= 1) { SendClientMessage(playerid, 0xFFFFFFFF, "[ADMINCMD]: /bla /bla /bla"); SendClientMessage(playerid, 0xFFFFFFFF, "[ADMINCMD]: /bla /bla /bla"); SendClientMessage(playerid, 0xFFFFFFFF, "[ADMINCMD]: /bla /bla /bla"); SendClientMessage(playerid, 0xFFFFFFFF, "[ADMINCMD]: /bla /bla /bla"); return 1; } } return SendClientMessage(playerid, 0xFFFFFFFF, "You are not an admin!"); }
\GTA\SAMPSERV\filterscripts\SeifAdmin.pwn(2644) : warning 217: loose indentation \GTA\SAMPSERV\filterscripts\SeifAdmin.pwn(2654) : warning 217: loose indentation \GTA\SAMPSERV\filterscripts\SeifAdmin.pwn(2657) : error 010: invalid function or declaration \GTA\SAMPSERV\filterscripts\SeifAdmin.pwn(2659) : error 010: invalid function or declaration \GTA\SAMPSERV\filterscripts\SeifAdmin.pwn(2661) : error 010: invalid function or declaration \GTA\SAMPSERV\filterscripts\SeifAdmin.pwn(2663) : error 010: invalid function or declaration \GTA\SAMPSERV\filterscripts\SeifAdmin.pwn(2671) : error 010: invalid function or declaration Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.
if(strcmp("/acmds", cmdtext, true, 10) == 0) { if(AccountInfo[playerid][AdminLevel] >= 1) { SendClientMessage(playerid, 0xFFFFFFFF, "[ADMINCMD]: /bla /bla /bla"); SendClientMessage(playerid, 0xFFFFFFFF, "[ADMINCMD]: /bla /bla /bla"); SendClientMessage(playerid, 0xFFFFFFFF, "[ADMINCMD]: /bla /bla /bla"); SendClientMessage(playerid, 0xFFFFFFFF, "[ADMINCMD]: /bla /bla /bla"); return 1; } } return SendClientMessage(playerid, 0xFFFFFFFF, "You are not an admin!"); }
\GTA\SAMPSERV\filterscripts\SeifAdmin.pwn(2644) : warning 217: loose indentation Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Warning.
if(strcmp("/acmds", cmdtext, true, 6) == 0) //should be 6 because /acmds is 6 characters
{
if(pAdminLvl[playerid] >= 1)
{
SendClientMessage(playerid, 0xFFFFFFFF, "[ADMINCMD]: /bla /bla /bla");
SendClientMessage(playerid, 0xFFFFFFFF, "[ADMINCMD]: /bla /bla /bla");
SendClientMessage(playerid, 0xFFFFFFFF, "[ADMINCMD]: /bla /bla /bla");
SendClientMessage(playerid, 0xFFFFFFFF, "[ADMINCMD]: /bla /bla /bla");
}
else return SendClientMessage(playerid, 0xFFFFFFFF, "You are not a admin!");
}