SA-MP Forums Archive
Class Help! - 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)
+--- Thread: Class Help! (/showthread.php?tid=631750)



Class Help! - IceSKull - 04.04.2017

Hello everyone!

I have a problem! When do i use /sc it Also Show me the Team Selection dialog too!
Код:
CMD:sc(playerid, params[])
{
	if(gTeam[playerid] == TEAM_USA || gTeam[playerid] == TEAM_ARAB || gTeam[playerid] == TEAM_ASIA || gTeam[playerid] == TEAM_AUS || gTeam[playerid] == TEAM_EURASIA || gTeam[playerid] == TEAM_SOVIET ) SendClientMessage(playerid, yellow,"*You are forced to class selection.");
	else if(gTeam[playerid] == TEAM_MERC || gTeam[playerid] == TEAM_latin) return SendClientMessage(playerid, red, "*Mercenary and latin Team dose not have any classes.");
	ForceClassSelection(playerid); -------------------- Main Point
   	FirstSpawn[playerid] = 1;  -------------------- Main Point
    return 1;
}
This is the Code!

And This code is in OnPlayerClassRequest!
Код:
 if(FirstSpawn[playerid] == 1 && !IsPlayerNPC(playerid))
    {
    ClassDialog(playerid);
................ }
Theres nothing on death that makes the FirstSpawns 0
Please help!


Re: Class Help! - AndreiWow - 04.04.2017

Well, remove
ForceClassSelection(playerid);
and
FirstSpawn[playerid] = 1;

and add the Class dialog under the /sc command?


Re: Class Help! - IceSKull - 04.04.2017

well i want that player to be spectating And when i use the TOGGLEPLAYERSPECTATING! The Dialog replace with other one!


Re: Class Help! - AndreiWow - 04.04.2017

Well, toggleplayerspectating and change his camera position, show him the dialog, and when he clicks on something set him that class, toggle the spectating off and set the camera behind him


Re: Class Help! - IceSKull - 04.04.2017

pfff i Know thats easy! But the new Info Dialog Appears! idk why! and replace that Class one with that info one!


Re: Class Help! - jlalt - 04.04.2017

maybe try replacing areas D:
PHP код:
       ForceClassSelection(playerid); -------------------- Main Point
       FirstSpawn
[playerid] = 1;  -------------------- Main Point[/php 
->
PHP код:
       FirstSpawn[playerid] = 1;  -------------------- Main Point
       ForceClassSelection
(playerid); -------------------- Main Point 



Re: Class Help! - IceSKull - 04.04.2017

Let me try :P


Re: Class Help! - AndreiWow - 04.04.2017

Quote:
Originally Posted by IceSKull
Посмотреть сообщение
pfff i Know thats easy! But the new Info Dialog Appears! idk why! and replace that Class one with that info one!
Maybe you are misplacing the Dialog IDs


Re: Class Help! - IceSKull - 04.04.2017

Well How could it be possbile! Im the fu*king Coding to show to class but it shows Team!
Код:
if(FirstSpawn[playerid] == 0))
	{
 TeamDialog(playerid);
    }
I have added this too! But still Fu*ked up!


Re: Class Help! - AndreiWow - 04.04.2017

Show me the full code of the info dialog and team dialog.