Class selection titles.
#1

Well, I'm working on a new project my TDM server, I have multiple classes and i want to put a title when i swich through them, I'm not really sure where i should start with this so i decided to come here, Anyone got any help?

My actual AddPlayerClasses:
Код:
	//HillBilly classes
	AddPlayerClass(159,-1507.4792,1970.0309,48.4219,178.7565,0,0,0,0,0,0);
    AddPlayerClass(158,-1507.4792,1970.0309,48.4219,178.7565,0,0,0,0,0,0);
    AddPlayerClass(157,-1507.4792,1970.0309,48.4219,178.7565,0,0,0,0,0,0);
    //U.S AurForce class.
    AddPlayerClass(61,428.1319,2499.8589,16.4844,87.5397,0,0,0,0,0,0);
    //Russian Federation class.
    AddPlayerClass(111,214.0262,1874.0927,13.1406,1.0193,0,0,0,0,0,0);
    AddPlayerClass(112,214.0262,1874.0927,13.1406,1.0193,0,0,0,0,0,0);
    AddPlayerClass(113,214.0262,1874.0927,13.1406,1.0193,0,0,0,0,0,0);
    //Assassin class.
    AddPlayerClass(33,2007.3893,2909.3374,47.8231,181.4810,0,0,0,0,0,0);
    AddPlayerClass(264,2007.3893,2909.3374,47.8231,181.4810,0,0,0,0,0,0);
	return 1;
Reply
#2

Start from SA-MP Wiki: https://sampwiki.blast.hk/wiki/PAWN_tutorial
Reply
#3

Not sure if it would work..but try it

Код:
public OnPlayerRequestClass(playerid, classid)
{

	switch (classid)
	{
		case 0, 1, 2: // 3 skins for this class
		{
			// Display the name of the class
                       GameTextForPlayer(playerid, "HillBilly", 3000, 4);
		}
		case 3: // 1 skin for this class
		{
			// Display the name of the class
                       GameTextForPlayer(playerid, "U.S AurForce" class, 3000, 4);
		}

                // And so on....
       }
   return 1;
}
Reply
#4

Try this
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    switch(classid)
    {
        case 0:
        {
            GameTextForPlayer(playerid, "HillyBilly", 2000, 5);
        }
        case 1:
        {
            GameTextForPlayer(playerid, "USAirForce", 2000, 5);
        }
        case 2:
        {
            GameTextForPlayer(playerid, "Russia", 2000, 5);
        }
        case 3:
        {
            GameTextForPlayer(playerid, "Assassin", 2000, 5);
        }
    }
    return 1;
}
Reply
#5

Quote:
Originally Posted by MadeMan
Посмотреть сообщение
Lmao, I know how to script PAWNO, I'm just clueless on how to do this class title thing. Lol.
Reply
#6

Quote:
Originally Posted by Lexi'
Посмотреть сообщение
Try this
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    switch(classid)
    {
        case 0:
        {
            GameTextForPlayer(playerid, "HillyBilly", 2000, 5);
        }
        case 1:
        {
            GameTextForPlayer(playerid, "USAirForce", 2000, 5);
        }
        case 2:
        {
            GameTextForPlayer(playerid, "Russia", 2000, 5);
        }
        case 3:
        {
            GameTextForPlayer(playerid, "Assassin", 2000, 5);
        }
    }
    return 1;
}
He have more than 1 skin for some class
Reply
#7

Quote:
Originally Posted by VladCanarez
Посмотреть сообщение
Lmao, I know how to script PAWNO, I'm just clueless on how to do this class title thing. Lol.
Ok, smartass, first of all, it's PAWN, not PAWNO. Secondly, NO you DON'T know how to script if you can't do this simple thing. Thirdly, did you even click on the link?
Reply
#8

Quote:
Originally Posted by VladCanarez
Посмотреть сообщение
Lmao, I know how to script PAWNO, I'm just clueless on how to do this class title thing. Lol.
If you know how to script than is making a class text easy in PAWN
Reply
#9

Quote:
Originally Posted by Mr.Anonymous
Посмотреть сообщение
Not sure if it would work..but try it

Код:
public OnPlayerRequestClass(playerid, classid)
{

	switch (classid)
	{
		case 0, 1, 2: // 3 skins for this class
		{
			// Display the name of the class
                       GameTextForPlayer(playerid, "HillBilly", 3000, 4);
		}
		case 3: // 1 skin for this class
		{
			// Display the name of the class
                       GameTextForPlayer(playerid, "U.S AurForce" class, 3000, 4);
		}

                // And so on....
       }
   return 1;
}
Thanks for helping me instead of being a dick like MadeMan over here, +rep'd.
Reply
#10

Quote:
Originally Posted by Mr.Anonymous
Посмотреть сообщение
He have more than 1 skin for some class
Oh i didn't notice thanks for informing fixed...
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    if(classid == 1)
    {
        GameTextForPlayer(playerid, "HillyBilly", 2000, 5);
    }
    else if(classid == 2)
    {
        GameTextForPlayer(playerid, "HillyBilly", 2000, 5);
    }
    else if(classid == 3)
    {
        GameTextForPlayer(playerid, "HillyBilly", 2000, 5);
    }
    else if(classid == 4)
    {
        GameTextForPlayer(playerid, "US AirForce", 2000, 5);
    }
    else if(classid == 5)
    {
        GameTextForPlayer(playerid, "Russia", 2000, 5);
    }
    else if(classid == 6)
    {
        GameTextForPlayer(playerid, "Russia", 2000, 5);
    }
    else if(classid == 7)
    {
        GameTextForPlayer(playerid, "Russia", 2000, 5);
    }
    else if(classid == 8)
    {
        GameTextForPlayer(playerid, "Assassin", 2000, 5);
    }
    else if(classid == 9)
    {
        GameTextForPlayer(playerid, "Russia", 2000, 5);
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)