SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 14/04/2017, 12:45 PM   #1
Loinal
Gangsta
 
Loinal's Avatar
 
Join Date: Feb 2016
Posts: 817
Reputation: 9
Default Level

Fixed
__________________

Last edited by Loinal; 15/04/2017 at 12:33 PM.
Loinal is offline   Reply With Quote
Old 14/04/2017, 12:53 PM   #2
GangstaSunny.
Huge Clucker
 
GangstaSunny.'s Avatar
 
Join Date: Apr 2010
Location: Hamburg - Germany
Posts: 244
Reputation: 41
Default Re: Level

Check if the user was already an admin. If so, don't ++ your variable.
GangstaSunny. is offline   Reply With Quote
Old 14/04/2017, 01:06 PM   #3
Loinal
Gangsta
 
Loinal's Avatar
 
Join Date: Feb 2016
Posts: 817
Reputation: 9
Default Re: Level

Quote:
Originally Posted by GangstaSunny. View Post
Check if the user was already an admin. If so, don't ++ your variable.
How can i check that?
__________________
Loinal is offline   Reply With Quote
Old 14/04/2017, 03:45 PM   #4
GangstaSunny.
Huge Clucker
 
GangstaSunny.'s Avatar
 
Join Date: Apr 2010
Location: Hamburg - Germany
Posts: 244
Reputation: 41
Default Re: Level

PHP Code:
if(level pData[lookupid][Admin]) 
        { 
            new 
irc[130]; 
            
format(irc,sizeof(str),"8,3* Admin %s (ID: %d) granted level %d to %s (ID: %d)",GetName(playerid), playeridlevel,GetName(lookupid),lookupid); 
            
IRC_GroupSay(groupIDIRC_CHANNELirc); 
            
format(strsizeof(str), "Admin %s (ID:%d) has granted level %d to you",GetName(playerid), playeridlevel); 
            
SendClientMessage(lookupidCOLOR_YELLOWstr); 
            
format(strsizeof(str),"You have setted %s (ID:%d) to level %d",GetName(lookupid),lookupid,level); 
            
SendClientMessage(playeridCOLOR_YELLOWstr);
            if(
level >= 3
            {
            if(
pData[lookupid][Admin] < 3){onlineadmins++;}//If not already an admin count ++
            
pData[lookupid][Admin] = level;//now set the level
            
new strings[100+1000]; 
            
format(stringssizeof(strings), "Online Admins: %d",onlineadmins); 
            
TextDrawSetString(oastrings); 
            
TextDrawShowForPlayer(playeridoa); 
            } 
        } 
GangstaSunny. is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Level up for all superaconi Scripting Help 1 01/06/2013 11:57 PM
Exp and Level Zex Tan Scripting Help 3 01/01/2013 04:46 AM
Adding 1 Wanted Level to present wanted level. Shockey HD Help Archive 1 12/08/2011 03:40 AM
[HELP]Level up! Ivica_Razor Help Archive 2 30/01/2011 09:46 AM


All times are GMT. The time now is 06:08 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.