I Got lil bit confused
#1

Hey guys... i got confused while this thing

pawn Код:
CMD:Example An Admin CMD(playerid, params[])
{
   if(IsPlayerAdmin(playerid))
   {
I have 5 admin LVLS On My Server i wanted to set a admin area only that admins only can enter a place without
logging in RCON

if u just give me a Example it be nice

PS: i know how set that thing but i learned PAWNO So many months ago so i cant remember..
Reply
#2

Take whatever variable you store the player's admin level in, and check whether it is 1 of higher.
Reply
#3

can u write down the script line?
Reply
#4

Here :
pawn Код:
CMD:enteradmin(playerid, params[])
{
   if(PlayerInfo[playerid][pAdmin] >= 1)
   {
    return SendClientMessage(playerid, COLOR_RED, "You are not admin!"
   {
         SetPlayerPos(playerid, your credentials);
         SendClientMessage(playerid, COLOR_RED, "Admins area"
         return 1;
    }
}
Reply
#5

ok but in my script it like this

pawn Код:
CMD:backaship(playerid, params[])
{
    if(IsPlayerAdmin(playerid) )
    {
    new string[120];
    new shiptime1 = MoveObject(Ship, 3249.76074, -1915.40479, 14.25000, 5.00); //Move the Ship (Object) to the next island
    MoveObject(Ship1, 3249.91553, -1915.26013, 14.06402, 5.00); //Move the second part of the Ship (Object) to the next island
    GameTextForPlayer(playerid,"~b~Admin Ship Moving!",2500, 3); //Normal Text in the middle of the screen
    SendClientMessage(playerid, COLOR_PURPLE, "Admin Ship moving to the next island!"); //Sends the player a message
    format(string, sizeof(string), "The ship will arrive at the Main Island in %d MilliSeconds", shiptime1);
    SendClientMessage(playerid, 0xFFFF00AA, string);
    }
    else return SendClientMessage(playerid, COLOR_GREY,"You are not authorized to use that command");
    return 1;
there are bunch more stuff are there i just wanted cmd set LVL 1 To LVL 7 and give a example
Reply
#6

IsPlayerAdmin is a function to check if the player is logged onto the RCON or not. You will need to use your variable for your player information, if you don't have a working account system, then go make one. Then you'd use
pawn Код:
if(PlayerInfo[playerid][pAdminLevel] < 5) return 0; // This will show: unknown server command.
Reply
#7

so my script should look like this?


pawn Код:
CMD:backashark(playerid, params[])
{
    if(PlayerInfo[playerid][pAdminLevel] < 5)
    {
    new string[140];
    new sharktime1 = MoveObject(Shark, 3225.66357, -1858.81152, 0.35000, 2.00);
    GameTextForPlayer(playerid,"~b~Shark is Moving!",2500, 3);
    SendClientMessage(playerid, COLOR_RED, "Shark is getting back to it's original place!!");
    format(string, sizeof(string), "The shark will return back to it's original position in %d MilliSeconds", sharktime1);
    SendClientMessage(playerid, 0xFFFF00AA, string);
    }
    else return SendClientMessage(playerid, COLOR_GREY,"You are not authorized to use that command");
    return 1
Reply
#8

yea, its correct
Reply
#9

are u really sure? lets wait until isolated awnser comes
Reply
#10

Код:
C:\Documents and Settings\Administrator\Desktop\My Servers\mama(Windows)\pawno\include\YSI/y_ini.inc(161) : fatal error 100: cannot read from file: "internal\y_version"

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
whats this?
include problem? , can u please give me lastest version of includes ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)