how to create codes like [playerId][PlayerData]
#1

Eg If [pData][pAdmin] <= 5
SendClientMessage(playerid, "Command successfully executed");

hope u got what im trying to say..
Reply
#2

Use enums to save player's info.
Reply
#3

Quote:
Originally Posted by XHunterZ
Посмотреть сообщение
Eg If [pData][pAdmin] <= 5
SendClientMessage(playerid, "Command successfully executed");

hope u got what im trying to say..
For an example you've to make Admin system like this:

PHP код:
enum PlayerData {
    
Pass,
    
Cash,
    
Score,
        
Admin
};
new 
Player[MAX_PLAYERS][PlayerData]; 
So when you'd make a command just for admin:

PHP код:
CMD:healme(playerid,params[])

     if(
Player[playerid][Admin] >= 1)
     {
         
SetPlayerHealth(playerid100);
         
SendClientMessage(playerid0xF8F8F8FFF"[SERVER]: {FFFFFF}You've been successfully Healed!");
      }
      return 
1;

and like that..
And to learn how to make a simple Admin system just click here
Reply
#4

Quote:
Originally Posted by Whillyrez
Посмотреть сообщение
Use enums to save player's info.
Read this please,https://sampforum.blast.hk/showthread.php?tid=318307
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)