SA-MP Forums Archive
A few questions. - 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: A few questions. (/showthread.php?tid=199275)



A few questions. - MrIncredible - 15.12.2010

Ok first of all, "SetPlayerTeam" is not working as it should. now should I make a timer to check plyer's team, and then SetPlayerTeam?
Second,some timers don't work as they should, they sometimes fail. They spam everything. Well, it doesn't happen always, but i can't realy tell when it usualy happens, and when that happens everything gets f*cked up.

Third, is there a way to force players to their class selection without killing them at first place?

Forth, ok as I upgraded to 0.3b, ALL the animations I had, do not work anymore... What do I do?


Re: A few questions. - [UG]Scripter - 15.12.2010

Use:


// Top Of Script
new PlayerTeam[playerid];

#define Team_team 0

// Your Code
if(PlayerTeam[playerid] == Team_Team)

You can also use GetPlayerTeam(playerid);


Re: A few questions. - iggy1 - 15.12.2010

A1) SetPlayerTeam works for me maybe tell us your specific problem.
A2) Timers work if you use them correctly.
A3) No.
A4) Check the functions out on the wiki and make the nessasary changes.
Quote:
Originally Posted by [UG]Scripter
Посмотреть сообщение
Use:


// Top Of Script
new PlayerTeam[playerid];

#define Team_team 0

// Your Code
if(PlayerTeam[playerid] == Team_Team)

You can also use GetPlayerTeam(playerid);
No you can't. You need to use SetPlayerTeam first, before you can use GetPlayerTeam.


Re: A few questions. - [UG]Scripter - 15.12.2010

Quote:
Originally Posted by iggy1
Посмотреть сообщение
A1) SetPlayerTeam works for me maybe tell us your specific problem.
A2) Timers work if you use them correctly.
A3) No.
A4) Check the functions out on the wiki and make the nessasary changes.

No you can't. You need to use SetPlayerTeam first, before you can use GetPlayerTeam.
Obviously. That was a basic analergy of what he should use....


Re: A few questions. - iggy1 - 15.12.2010

In your post you said "use:". Not analogy. Its wrong to give advise if its misleading.


Re: A few questions. - MrIncredible - 15.12.2010

Ok, thanks, but how do i make a 3D text on a player, when he spawns he gets "blah"on his head and when he dies the text gets removed..
Ok i made this, but it doesn't work...
Код:
This is on playerspawn
glabel[playerid] = Create3DTextLabel("Douche",RED,0,0,0,0,0,0);
Attach3DTextLabelToPlayer(glabel[playerid], playerid, 0.0, 0.0, 0.7);
And onplayerdeath i put this

Delete3DTextLabel(glabel[playerid]);

But i never see the text on my friends head ...