Player Class Info? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Player Class Info? (
/showthread.php?tid=98662)
Player Class Info? -
Quest123 - 22.09.2009
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?
Re: Player Class Info? -
DeathOnaStick - 22.09.2009
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
Re: Player Class Info? -
Ov3rl0rd - 22.09.2009
Download the godfather script and check out the playerspawn stuff, it does the exact same thing when choosing a player class.
Re: Player Class Info? -
_Vortex - 22.09.2009
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);
}
Re: Player Class Info? -
Quest123 - 23.09.2009
Are those " cases " the id of the skin
?
Re: Player Class Info? -
ilikepie2221 - 23.09.2009
Quote:
Originally Posted by Quest123
Are those " cases " the id of the skin ?
|
Yes.
Re: Player Class Info? -
_Vortex - 23.09.2009
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.
Re: Player Class Info? -
Quest123 - 23.09.2009
sweet, so where would i put that script
? in my gamemode?