Admin on~off duty -
Johny_James - 23.07.2010
Hi,if anyone could create a filterscript on which admin can be on and off duty,i need it for my server as quickly as possible,my server is running on 0.2x
Re: Admin on~off duty -
TTJJ - 23.07.2010
Hi Johny_James,
A pretty simple function really
Код:
//Top of script
new AdminDuty[MAX_PLAYERS];
//OnPlayerConnect
AdminDuty[playerid] = 0;
//OnPlayerCommand
if(strcmp(cmdtext,"/adminduty",true) == 0)
{
if(IsPlayerAdmin(playerid))
{
if(AdminDuty[playerid] == 0)
{
AdminDuty[playerid] = 1;
SetPlayerColor(playerid,CUSTOM_COLOR);
return 1;
}
else
{
AdminDuty[playerid] = 0;
SetPlayerColour(playerid,DEFAULT_COLOUR);
return 1;
}
}
else
{
SendClientMessage(playerid,COLOUR_WARNING,"You are not an administrator!");
return 1;
}
}
Hope this helped out!
Cheers,
TJ
Re: Admin on~off duty -
Johny_James - 23.07.2010
man,i'm not very much pro on this scripting thing,but i've opened pawno and copied it with #include <a_samp> saved and compiled and it made 11 errors,so could you maybe give me complete or correct one?And download link would be awesome
Re: Admin on~off duty -
DJDhan - 23.07.2010
Please show us your errors. Also the lines where the compiler says the errors are.
Re: Admin on~off duty -
TheKingOfSamp - 23.07.2010
if(strcmp("/adminduty",cmdtext,true) == 0 )
OnPlayerConnect
AdminDuty[playerid]= 1
if(IsPlayerAdmin(playerid))
if(AdminDuty[playerid]) == 1)
AdminDuty[Playerid] == 1
Setplayercolor(playerid,COLOR_YOU_WANT);
done , if you got any problem i will repair
Re: Admin on~off duty -
Johny_James - 23.07.2010
Quote:
Originally Posted by DJDhan
Please show us your errors. Also the lines where the compiler says the errors are.
|
C:\Users\Uros\Desktop\test.pwn(7) : error 010: invalid function or declaration
C:\Users\Uros\Desktop\test.pwn(10) : error 010: invalid function or declaration
C:\Users\Uros\Desktop\test.pwn(13) : error 010: invalid function or declaration
C:\Users\Uros\Desktop\test.pwn(16) : error 010: invalid function or declaration
C:\Users\Uros\Desktop\test.pwn(20) : error 010: invalid function or declaration
C:\Users\Uros\Desktop\test.pwn(22) : error 010: invalid function or declaration
C:\Users\Uros\Desktop\test.pwn(26) : error 010: invalid function or declaration
C:\Users\Uros\Desktop\test.pwn(29) : error 054: unmatched closing brace ("}")
C:\Users\Uros\Desktop\test.pwn(30) : error 010: invalid function or declaration
C:\Users\Uros\Desktop\test.pwn(33) : error 010: invalid function or declaration
C:\Users\Uros\Desktop\test.pwn(36) : error 054: unmatched closing brace ("}")
C:\Users\Uros\Desktop\test.pwn(37) : warning 203: symbol is never used: "AdminDuty"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
11 Errors.
__________________________________________________ ______________________________________________
Quote:
if(strcmp("/adminduty",cmdtext,true) == 0 )
OnPlayerConnect
AdminDuty[playerid]= 1
if(IsPlayerAdmin(playerid))
if(AdminDuty[playerid]) == 1)
AdminDuty[Playerid] == 1
Setplayercolor(playerid,COLOR_YOU_WANT);
done , if you got any problem i will repair
|
3 errors my friend
C:\Users\Uros\Desktop\test.pwn(3) : error 010: invalid function or declaration
C:\Users\Uros\Desktop\test.pwn(6) : error 010: invalid function or declaration
C:\Users\Uros\Desktop\test.pwn(7) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Errors.
i'm gonna say again,if you could just give me download links from amx and pwn.That would be really nice!
Re: Admin on~off duty -
Johny_James - 26.07.2010
So i'm still waiting if someone could help me?
Re: Admin on~off duty -
Yamoo - 26.07.2010
Did you change "COLOR_YOU_WANT"??
setplayercolor(playerid,COLOR_YOU_WANT)
Re: Admin on~off duty -
Johny_James - 26.07.2010
i told everyone,i'm not such good scripter,just give me pwn!
Re: Admin on~off duty -
Yamoo - 26.07.2010
Quote:
Originally Posted by Johny_James
i told everyone,i'm not such good scripter,just give me pwn!
|
You didn't answer my question? Did you change it?