onplayerrequestclass help
#9

Well your just going to have to make a command to give him access.
pawn Код:
new AllowedPlayer[MAX_PLAYERIS];
Then, just change the earlier OnPlayerRequestSpawn to:
pawn Код:
public OnPlayerRequestSpawn(playerid)
{    
    if(RestrictedSkin[playerid] == 1 && AllowedPlayer[playerid] ==0)    
    {      
        SendClientMessage(playerid, 0xFF0000FF, "Restricted Skin!");        
        return 0;    
    }    
    return 1;
}
And give him access:
pawn Код:
new subjectid;
if(strcmp(string, "/giveaccess", true) == 0)
{
    string = strtok(cmdtext,idx);
    if(!strlen(string))
    {
        SendClientMessage(playerid, COLOR_GREY, "USAGE: /giveaccess [playerid/partofname]");
        return 1;  
    }
    subjectid = ReturnUser(string);
    SendClientMessage(playerid, 0xFFFFFFFF, "You have given access to the player");
    SendClientMessage(subjectid, 0xFFFFFFFF, "You have recieved VIP access");
    AllowedPlayer[subjectid] = 1;
}
Now you just save that the player is allowed in his user files so that you don't have to always redo it after he logs out.
Reply


Messages In This Thread
onplayerrequestclass help - by sherlock - 10.07.2011, 20:50
Re: onplayerrequestclass help - by sherlock - 10.07.2011, 20:58
Re: onplayerrequestclass help - by Salmon - 10.07.2011, 21:00
Re: onplayerrequestclass help - by sherlock - 10.07.2011, 21:06
Re: onplayerrequestclass help - by Adil - 10.07.2011, 21:14
Re: onplayerrequestclass help - by sherlock - 10.07.2011, 21:18
Re: onplayerrequestclass help - by Adil - 10.07.2011, 21:34
Re: onplayerrequestclass help - by sherlock - 10.07.2011, 21:36
Re: onplayerrequestclass help - by Adil - 10.07.2011, 21:50

Forum Jump:


Users browsing this thread: 2 Guest(s)