Custom Spawn Button(Textdraw)
#1

Ok, like the tittle says, i've removed the spawn button to make a custom one but.. to switch players,

PHP код:
public OnPlayerClickTextDraw(playeridText:clickedid)
{
  if(
clickid == PlayerText:Textdraw7);
  {
    
SpawnPlayer(playerid);
  }
  else if(
clickid == PlayerText:Textdraw8); // Kinda stuck here
  

ye stuck there at textdraw 8..
Reply
#2

You mean to switch skins?
Send player to request class, ForceClassSelection(playerid) or use SetSpawnInfo.
Or use more textdraws to make skins in textdraws or something like that.

If I missunderstood, what do you mean to switch players?
Reply
#3

No, i meant, If you know when you're at class selection, You got those < >, To switch skins like, Change team, If you know what i'm sayin, i wonder how can i do if i press at textdraw and it's goes < or >
Reply
#4

You can just make a textdraw box with the text being "<" or ">" simply - and when they press set their spawn information and spawn them into the game.
Reply
#5

I did textdraw with < >, but when they press it, what do i need to write here

else if(clickid == PlayerText:Textdraw;
{
Here so it'll do NEXT
Reply
#6

bump !
Reply
#7

So,define variable skin and then use it into SetSpawnInfo inside
Код:
else if(clickid == PlayerText:Textdraw ;
{
Reply
#8

How? I need more explanation.. i forgot all the scripting things
Reply
#9

You have PlayerInfo[playerid][pSkin] and when player use "<" or ">" change it to different skin id.

Then,when he click "spawn",spawn him with a code :

Код:
SetSpawnInfo( playerid, team , PlayerInfo[playerid][pSkin] , Float:x, Float:y , Float:z , Float:Angle,weapon1, weapon1_ammo, weapon2,
weapon2_ammo, weapon3, weapon3_ammo);
Reply
#10

edit: nvm, i'll do it in the next versions, thanks for the help tho
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)