[FilterScript] GAdmin v2 - Integrated form with many new features (0.3.7 R2-1+ only)
#81

I registered, okay, so when soon again it says that my password is wrong even though it is right, and when I recover it my admin level is 0, and the GAdmins folder is in scriptfiles, what can it be?
Reply
#82

please fix the login system
Reply
#83

Quote:

\filterscripts\gadmin.pwn(756) : error 029: invalid expression, assumed zero
\filterscripts\gadmin.pwn(756) : error 001: expected token: ")", but found ";"
\filterscripts\gadmin.pwn(756) : warning 215: expression has no effect
\filterscripts\gadmin.pwn(756) : error 001: expected token: ")", but found ";"
\filterscripts\gadmin.pwn(756) : fatal error 107: too many error messages on one line

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


4 Errors.

Help me
Reply
#84

New version will be posted soon!
Reply
#85

Quote:

for (new i, j = GetPlayerPoolSize(); i <= j; i++)

error -_-
Reply
#86

Code:
C:\Users\Ali Computer\Desktop\GAdmin\filterscripts\gadmin.pwn(30) : fatal error 100: cannot read from file: "spectate"

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


1 Error.
Reply
#87

What About This Error When I compile Its Cant WithOut .amx File I cant Add this On my FS How i can add this can u send This .amx File?
Reply
#88



guzs see this when i load fs then its give me this
Reply
#89

http://imgur.com/a/IxSOo
Reply
#90

where is the filterscripts ?
Reply
#91

I'm using your server and it's great, but the 2/2 part to be admin I do not understand, could you explain? (I'm new)
Reply
#92

Quote:
Originally Posted by dopeboy1040
View Post
Code:
C:\Users\Ali Computer\Desktop\GAdmin\filterscripts\gadmin.pwn(30) : fatal error 100: cannot read from file: "spectate"

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


1 Error.
Same problem i have. where i can find this spectate inc?
Reply
#93

Quote:
Originally Posted by KratosRoG
View Post
Same problem i have. where i can find this spectate inc?
Click Me! Save this as spectate.inc in pawno/include and recompile.
Reply
#94

original:
PHP Code:
CMD:god(playerid)
{
    if (!
IsPlayerAdmin(playerid) && p_Account[playerid][E_ACCOUNT_ADMIN_LEVEL] < 1)
        return 
SendClientMessage(playeridCOLOR_TOMATO"Error: Only admin level 1 and above have access to this command.");
    if (!
p_Data[playerid][E_PDATA_GODMODE])
    {
        
SetPlayerHealth(playeridFLOAT_INFINITY);
        
GameTextForPlayer(playerid"~g~Godmode on"50003);
    }
    else
    {
        
SetPlayerHealth(playerid100.0);
        
GameTextForPlayer(playerid"~r~Godmode off"50003);
    }
    
p_Data[playerid][E_PDATA_GODMODE] = !p_Data[playerid][E_PDATA_GODMODE];
    
PlayerPlaySound(playerid10570.00.00.0);
    return 
1;

I don't know why but some admins may want to do the way I want to... If admin health = 20.00 and does /god then /god off, then their health will be 100.00. If you want the admins health to return back to 20.00 (or whatever amount it was) then use this:

at the top of the script add:
PHP Code:
Float:oldHealth[MAX_PLAYERS]; 
at CMD:god(playerid)
PHP Code:
CMD:god(playerid)
{
    if (!
IsPlayerAdmin(playerid) && p_Account[playerid][E_ACCOUNT_ADMIN_LEVEL] < 1)
        return 
SendClientMessage(playeridCOLOR_TOMATO"Error: Only admin level 1 and above have access to this command.");
    if (!
p_Data[playerid][E_PDATA_GODMODE])
    {
        
GetPlayerHealth(playeridoldHealth[playerid]);
        
SetPlayerHealth(playeridFLOAT_INFINITY);
        
GameTextForPlayer(playerid"~g~Godmode on"50003);
    }
    else
    {
        
SetPlayerHealth(playeridoldHealth[playerid]);
        
GameTextForPlayer(playerid"~r~Godmode off"50003);
    }
    
p_Data[playerid][E_PDATA_GODMODE] = !p_Data[playerid][E_PDATA_GODMODE];
    
PlayerPlaySound(playerid10570.00.00.0);
    return 
1;

basically grabs player health before it gets INFINITE and then after god mode is off it returns original health.
Reply
#95

Quote:
Originally Posted by billy1337samp
View Post
original:
PHP Code:
CMD:god(playerid)
{
    if (!
IsPlayerAdmin(playerid) && p_Account[playerid][E_ACCOUNT_ADMIN_LEVEL] < 1)
        return 
SendClientMessage(playeridCOLOR_TOMATO"Error: Only admin level 1 and above have access to this command.");
    if (!
p_Data[playerid][E_PDATA_GODMODE])
    {
        
SetPlayerHealth(playeridFLOAT_INFINITY);
        
GameTextForPlayer(playerid"~g~Godmode on"50003);
    }
    else
    {
        
SetPlayerHealth(playerid100.0);
        
GameTextForPlayer(playerid"~r~Godmode off"50003);
    }
    
p_Data[playerid][E_PDATA_GODMODE] = !p_Data[playerid][E_PDATA_GODMODE];
    
PlayerPlaySound(playerid10570.00.00.0);
    return 
1;

I don't know why but some admins may want to do the way I want to... If admin health = 20.00 and does /god then /god off, then their health will be 100.00. If you want the admins health to return back to 20.00 (or whatever amount it was) then use this where it says CMD:god(playerid)
PHP Code:
CMD:god(playerid)
{
    new 
Float:oldHealth[MAX_PLAYERS];
    if (!
IsPlayerAdmin(playerid) && p_Account[playerid][E_ACCOUNT_ADMIN_LEVEL] < 1)
        return 
SendClientMessage(playeridCOLOR_TOMATO"Error: Only admin level 1 and above have access to this command.");
    if (!
p_Data[playerid][E_PDATA_GODMODE])
    {
        
GetPlayerHealth(playeridoldHealth[playerid]);
        
SetPlayerHealth(playeridFLOAT_INFINITY);
        
GameTextForPlayer(playerid"~g~Godmode on"50003);
    }
    else
    {
        
SetPlayerHealth(playeridoldHealth[playerid]);
        
GameTextForPlayer(playerid"~r~Godmode off"50003);
    }
    
p_Data[playerid][E_PDATA_GODMODE] = !p_Data[playerid][E_PDATA_GODMODE];
    
PlayerPlaySound(playerid10570.00.00.0);
    return 
1;

basically grabs player health before it gets INFINITE and then after god mode is off it returns original health.
This will actually kill when you yurn off godmode!
Either make the variable global or put "static FloatldHealth[MAX_PLAYERS];" instead of "new FloatldHealth[MAX_PLAYERS];"
Reply
#96

Quote:
Originally Posted by Ritzy
View Post
Click Me! Save this as spectate.inc in pawno/include and recompile.
Thank you man its work!
Reply
#97

Quote:
Originally Posted by Gammix
View Post
This will actually kill when you yurn off godmode!
Either make the variable global or put "static FloatldHealth[MAX_PLAYERS];" instead of "new FloatldHealth[MAX_PLAYERS];"
He declared a global variable in a command, won't New Float: OldHealth[playerid]; do the work?
Reply
#98

Quote:
Originally Posted by Ritzy
View Post
He declared a global variable in a command, won't New Float: OldHealth[playerid]; do the work?
No, thats local variable! Everytime you run the command, a new oldHealth is declared.

Floats have a default value of 0.0 = death
Reply
#99

Quote:
Originally Posted by Gammix
View Post
No, thats local variable! Everytime you run the command, a new oldHealth is declared.

Floats have a default value of 0.0 = death
Isn't the [MAX_PLAYERS] wasting too many cells? [playerid] would do the same work won't it? Yes I know that it's declared as local but the cell size is global.
Reply

So at the top it's
PHP Code:
 new Float:oldHealth[MAX_PLAYERS]; 
?
I would rather not use static as to be honest I'm not sure what it is, I'm still in learning pawn. But i'm sure it would work.

edit: I have edited that post


Or we could do it with pVars something like
PHP Code:
            new Float:health
PHP Code:
            GetPlayerHealth(playeridhealth);
            
SetPVarFloat(playerid"oldHealth"health); 
then on off godmode something like
PHP Code:
SetPlayerHealth(playeridGetPVarFloat(playerid"oldHealth")); 
right?

but last time i used pvars in a filterscript i got the response
Quote:
Originally Posted by Kaperstone
View Post
Why are you using PVar? You're sharing arrays with an unknown gamemode?
PVar is intended for it and you better not use it just like that because it is slower than using normal arrays.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)