Player info save
#1

Well, when I connect in my server the only thing that saves is the money. My question is simple :

What do I have to script on my gamemode script to make the player's progress be saved (location, skin, weapon and ammo...) ?

And I have a second question to ask and I wanna know if someone can tell me how I can put restrictions on a skin, I mean I wanted some skin ids to be available only for admins and owner
Reply
#2

Add more variables to your enum and save them when the player disconnects
Reply
#3

Quote:
Originally Posted by MikeEd
Посмотреть сообщение
Add more variables to your enum and save them when the player disconnects
How do I do that ? And is it for my first question or the second one ?
Reply
#4

Try this i havent tested it.
for the second question
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
          if(IsAdminSkin(classid) == false)//check if the player is an admin
          {
                SendClientMessage(playerid,0x00FF00FF,"You're not a admin you can't use this skin");//send them a message
                return 0;
          }
          return 1;        
}

stock IsAdminSkin(skinid)
{
    switch(skinid)
    {
         case 0,74,299: return 1;//add all the skins you want locked to admins here.
    }
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)