Player Class Info?
#1

hey just wondering how would i make it when you're chosing your skin, when you scroll the skin says like what group its in and has like a defult spawn? sorry i am new to scripting e.g

If i scrolled across and landed on grove ryder skin it would like say:

Grove Member
The leader of the grove the baddest mofo around

Then if i select it it would spawn at grove?

Trying to make a script such as groups like " Stoners ", " Anti - Druggies ", " Total Crack Heads ", " Fighters ", " Civilians.

If you know what im talking about could you left?
Reply
#2

i would use SetPlayerClassEx and under OnPlayerRequestSpawn GametextForPlayer. I would use getPlayerClass then. It should look like this then(i didnt compile that, might have errors, but i just want to give an example):

Код:
OnPlayerRequestSpawn
{
if(GetPlayerTeam(playerid)==1) //shows your first teams' name
{
GameTextForPlayer(playerid, "Youre in Team One!", 3000, 3);
}
else if(GetPlayerTeam(playerid)==2)
{
GameTextForPlayer(playerid, "Youre in Team Two!", 3000, 3);
}
// And so On

return 1;
}
You have to set for a new Name you want to display, a new Team with AddPlayerClassEx and use the Code above to display the name. That's all. I hope it helped you.

Greetings,
DeathOnaStick
Reply
#3

Download the godfather script and check out the playerspawn stuff, it does the exact same thing when choosing a player class.
Reply
#4

Quote:
Originally Posted by DeathOnaStick
i would use SetPlayerClassEx and under OnPlayerRequestSpawn GametextForPlayer. I would use getPlayerClass then. It should look like this then(i didnt compile that, might have errors, but i just want to give an example):

Код:
OnPlayerRequestSpawn
{
if(GetPlayerTeam(playerid)==1) //shows your first teams' name
{
GameTextForPlayer(playerid, "Youre in Team One!", 3000, 3);
}
else if(GetPlayerTeam(playerid)==2)
{
GameTextForPlayer(playerid, "Youre in Team Two!", 3000, 3);
}
// And so On

return 1;
}
You have to set for a new Name you want to display, a new Team with AddPlayerClassEx and use the Code above to display the name. That's all. I hope it helped you.

Greetings,
DeathOnaStick
An easier way..
pawn Код:
switch(classid)
  {
    case 0: GameTextForPlayer(playerid,"text",1000,4);
    case 1: GameTextForPlayer(playerid,"text",1000,4);
    case 2: GameTextForPlayer(playerid,"text",1000,4);
    case 3: GameTextForPlayer(playerid,"text",1000,4);
    }
Reply
#5

Are those " cases " the id of the skin ?
Reply
#6

Quote:
Originally Posted by Quest123
Are those " cases " the id of the skin ?
Yes.
Reply
#7

Quote:
Originally Posted by ilikepie2221
Quote:
Originally Posted by Quest123
Are those " cases " the id of the skin ?
Yes.
No. That's the team id.
Reply
#8

sweet, so where would i put that script ? in my gamemode?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)