guyys see plzz
#1

guyys plzz help mee to make admin duty commmand plzzz.. i wana make it like when admin type /aduty .. all send message that he is on amin duty and he cant die also need chat buble on his head .. i made cmd but doesnt work i got erros


Код:
if(!strcmp(cmdtext, "/aduty", true))
	{
       if(!IsPlayerAdmin(playerid));
	   {
	   SetPlayerColor(playerid, COLOR_BBLUE)
	   SetPlayerChatBubble(playerid, "Administrator Dont Attack", 0xFF0000FF, 100.0, 10000);
       SetPlayerHealth(playerid, 9999999);
       SetPlayerArmour(playerid, 9999999);
	   return 1;
		}
	}
and this errors

Код:
C:\Documents and Settings\Holly-\Desktop\NighGame\gamemodes\NightGame.pwn(32462) : error 036: empty statement
C:\Documents and Settings\Holly-\Desktop\NighGame\gamemodes\NightGame.pwn(32465) : error 001: expected token: ";", but found "-identifier-"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#2

Try that , and don't create 2 threads about the same problem. Just reply to last one.
pawn Код:
if(!strcmp(cmdtext, "/aduty", true))
{
    if(IsPlayerAdmin(playerid))//Actually here you made !IsPlayerAdmin , that's mean if the player not admin..
    {
        SetPlayerColor(playerid, COLOR_BBLUE);//also here missing ';'
        SetPlayerChatBubble(playerid, "Administrator Dont Attack", 0xFF0000FF, 100.0, 10000);
        SetPlayerHealth(playerid, 9999999);
        SetPlayerArmour(playerid, 9999999);
        return 1;
    }//And finally here you forgot to close the bracket.
    return 0;
}
Reply
#3

I am not a Scripter but i think your strmp is wrong.

Код:
        if(!strcmp(cmdtext, "/aduty", true, 3))
Change the 3 into the length of /aduty

Try that.

And at the end try add this
Код:
        return 1;
    }
    return 0;
}
Reply
#4

bro i thinks its working i got no error no warning .. but wit this any1 cant kill me . ?

and i want that whe ni type this send messege to all that im on admin duty .. or if any admin type send all to he is on admin duty thanks you
Reply
#5

Quote:
Originally Posted by CroxL
Посмотреть сообщение
bro i thinks its working i got no error no warning .. but wit this any1 cant kill me . ?

and i want that whe ni type this send messege to all that im on admin duty .. or if any admin type send all to he is on admin duty thanks you
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/aduty", true))
    {
        if(IsPlayerAdmin(playerid))//Actually here you made !IsPlayerAdmin , that's mean if the player not admin..
        {
            new
                name[MAX_PLAYER_NAME],string[64];
            GetPlayerName(playerid,name,sizeof(name));
            format(string,sizeof(string),"Adminstrator %s has turned his duty on.",name);
            SendClientMessageToAll(COLOR_BBLUE,string);
            SetPlayerColor(playerid, COLOR_BBLUE);//also here missing ';'
            SetPlayerChatBubble(playerid, "Administrator Dont Attack", 0xFF0000FF, 100.0, 10000);
            SetPlayerHealth(playerid, 9999999);
            SetPlayerArmour(playerid, 9999999);
            return 1;
        }//And finally here you forgot to close the bracket.
    }
    return 0;
}
Suggestion : strcmp is too old , just move to new command processor like ZCMD or y_commands , which is pretty fast and easy to make a command with it example
pawn Код:
CMD:test(playerid,params[])
{
    SendClientMessage(playerid,-1,"Testing");
    return 1;
}
Reply
#6

i need to install something for commands like thatt ?? or ill write and done ?? dont laugh plz

bro also tell me command like when i type aduty it go off love you:*



bro that code you gave me doesnt work

public OnPlayerCommandText(playerid, cmdtext[])
{
Код:
    if(!strcmp(cmdtext, "/aduty", true))
    {
        if(IsPlayerAdmin(playerid))//Actually here you made !IsPlayerAdmin , that's mean if the player not admin..
        {
            new
                name[MAX_PLAYER_NAME],string[64];
            GetPlayerName(playerid,name,sizeof(name));
            format(string,sizeof(string),"Adminstrator %s has turned his duty on.",name);
            SendClientMessageToAll(COLOR_BBLUE,string);
            SetPlayerColor(playerid, COLOR_BBLUE);//also here missing ';'
            SetPlayerChatBubble(playerid, "Administrator Dont Attack", 0xFF0000FF, 100.0, 10000);
            SetPlayerHealth(playerid, 9999999);
            SetPlayerArmour(playerid, 9999999);
            return 1;
        }//And finally here you forgot to close the bracket.
    }
    return 0;
}
Reply
#7

No, it is normal, he just added set hp and armor to 999999 so you won't be killed. And yeah, nobody will laugh lol, this is called scripting help with reason. So just copy paste this command.
Reply
#8

Quote:
Originally Posted by xZdadyZx
Посмотреть сообщение
No, it is normal, he just added set hp and armor to 999999 so you won't be killed. And yeah, nobody will laugh lol, this is called scripting help with reason. So just copy paste this command.
that doesnt work lol
Reply
#9

Quote:
Originally Posted by CroxL
Посмотреть сообщение
that doesnt work lol
PHP код:
        if(IsPlayerAdmin(playerid))//Actually here you made !IsPlayerAdmin , that's mean if the player not admin..
        
{
            new
                
name[MAX_PLAYER_NAME],string[64];
            
GetPlayerName(playerid,name,sizeof(name)); 
Replace this with script above:
PHP код:
        if(IsPlayerAdmin(playerid))//Actually here you made !IsPlayerAdmin , that's mean if the player not admin..
        
{
            new 
name[MAX_PLAYER_NAME],string[64];
            
GetPlayerName(playerid,name,sizeof(name)); 
Also what are errors?
_____ OO now I see it
Install ZCMD plugin first
Then;
#include <ZCMD>
now delete line that haw alot of text, fine it and replace text in two lines/ delete it
Reply
#10

Can help me install zcmd plugin .. i already did it it was like notepad and i put it in includes
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)