SetPlayerClassId() posible?
#1

i need some function like this SetPlayerClassId(playerid,classid); this for what? your ask, well i want make a classelection divide by gender and my code is this.

pawn Код:
public OnPlayerRequestClass(playerid,classid)
{
    switch (PlayerInfo[playerid][gender])
    {
        case -1: return 0;
        case 0: SetupPlayerForClassSelectionM(playerid);
        case 1: SetupPlayerForClassSelectionW(playerid);
    }
    if (PlayerInfo[playerid][gender] == 1 && classid < 194)
    {
    SetPlayerClassId(playerid,194); //and the class 194 is a women
    }
    return 1;
}
mm the classid and skinid is not the same thing! if you say put this in your code SetPlayerSkin() -.- no, because is a diferent thing.
some can help me or say me "are you crazy this is imposible" u.u
Reply
#2

Use the callback itself.
Example
pawn Код:
OnPlayerRequestClass(playerid, 100);
Reply
#3

Quote:
Originally Posted by _Xerxes_
Use the callback itself.
Example
pawn Код:
OnPlayerRequestClass(playerid, 100);
yep i try this lately, and sorry but no say it xd, but dont work i try and dont work for all...
if im put this
pawn Код:
OnPlayerRequestClass(playerid, 194);
call the callback but with the classid number 0, every i call this OnPlayerRequestClass show the classid 0 for default =S
Reply
#4

Quote:
Originally Posted by [SOB
Chris ]
Quote:
Originally Posted by _Xerxes_
Use the callback itself.
Example
pawn Код:
OnPlayerRequestClass(playerid, 100);
yep i try this lately, and sorry but no say it xd, but dont work i try and dont work for all...
if im put this
pawn Код:
OnPlayerRequestClass(playerid, 194);
call the callback but with the classid number 0, every i call this OnPlayerRequestClass show the classid 0 for default =S
When you say it doesn't work; Does it not set your to the correct class id or does it not have any effect?
Reply
#5

Quote:
Originally Posted by _Xerxes_
Quote:
Originally Posted by [SOB
Chris ]
Quote:
Originally Posted by _Xerxes_
Use the callback itself.
Example
pawn Код:
OnPlayerRequestClass(playerid, 100);
yep i try this lately, and sorry but no say it xd, but dont work i try and dont work for all...
if im put this
pawn Код:
OnPlayerRequestClass(playerid, 194);
call the callback but with the classid number 0, every i call this OnPlayerRequestClass show the classid 0 for default =S
When you say it doesn't work; Does it not set your to the correct class id or does it not have any effect?
Dont set the correct class id, the classid i want set. but yes have effect.
Reply
#6

Quote:
Originally Posted by [SOB
Chris ]
Quote:
Originally Posted by _Xerxes_
Quote:
Originally Posted by [SOB
Chris ]
Quote:
Originally Posted by _Xerxes_
Use the callback itself.
Example
pawn Код:
OnPlayerRequestClass(playerid, 100);
yep i try this lately, and sorry but no say it xd, but dont work i try and dont work for all...
if im put this
pawn Код:
OnPlayerRequestClass(playerid, 194);
call the callback but with the classid number 0, every i call this OnPlayerRequestClass show the classid 0 for default =S
When you say it doesn't work; Does it not set your to the correct class id or does it not have any effect?
Dont set the correct class id, the classid i want set. but yes have effect.
As you said, classid and skinid are different, are you sure it's not setting the correct classid, but it's a different skinid that you want?
Reply
#7

Quote:
Originally Posted by _Xerxes_
As you said, classid and skinid are different, are you sure it's not setting the correct classid, but it's a different skinid that you want?
yes, but i tried what you say putting this code
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    switch (PlayerInfo[playerid][genero])
    {
        case -1: return 0;
        case 0: SetupPlayerForClassSelectionM(playerid);
        case 1: SetupPlayerForClassSelectionW(playerid);
    }
    if (PlayerInfo[playerid][genero] == 1 && classid < 194)
    {
    OnPlayerRequestClass(playerid, 194);
        SendClientMessage(playerid,WHITE,"This is not the 194 classid"); //show this message if the classid dont change to 194 avery time i change the skin with the arrows
    }
    return 1;
}
Reply
#8

someone? ='(,
or any idea to limit the playerclass
Reply
#9

Zomgf ^^ thanks, but i can use only the ysi skin system or i need change all my gm?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)