Help with /changeteam -
prooftzm - 05.07.2014
Hello all. I made a /changegang command but is bullshit.
Everytime when i type that, my gang is not changing and when i select a gang for changing, it's shows me a dialog_box from login system

anyone can help me with this command?
Re: Help with /changeteam -
SHE790 - 05.07.2014
show the lines LOL
Re: Help with /changeteam -
prooftzm - 05.07.2014
This is ondialogresponse. here is the problem
pawn Код:
if(response)// They pressed the first button.
{
switch(dialogid)// If you only have one dialog, then this isn't required, but it's neater for when you implement more dialogs.
{
case 1:// Our dialog!
{
switch(listitem)// Checking which listitem was selected
{
case 0:// The first item listed
{
if(PlayerInfo[playerid][pTeam] == 0)
{
SetPlayerTeam(playerid, 1);
SpawnPlayer(playerid);
}
case 1: // The second item listed
{
if(PlayerInfo[playerid][pTeam] == 1)
{
SetPlayerTeam(playerid, 0);
SpawnPlayer(playerid);
}
}
}
}
}
Re: Help with /changeteam -
Dziugsas - 05.07.2014
If sometimes it show Login Dialog then dialog ids are conflicting with each other...
Re: Help with /changeteam -
prooftzm - 05.07.2014
Oh...i try to fix that but, why my gang is not changing

where is the problem>?
Re: Help with /changeteam -
iFarbod - 05.07.2014
pawn Код:
CMD:changeteam(playerid, params[])
{
ForceClassSelection(playerid);
SetPlayerHealth(playerid, 0.0);
return 1;
}
CMD:changegang(playerid, params[])
{
return cmd_changeteam(playerid, params[]);
}
OffTopic: Please learn to
indent your code
(How to use TABs)
Re: Help with /changeteam -
Dziugsas - 05.07.2014
you were probably checking player team on spawn and you didnt update PlayerInfo:
pawn Код:
if(response)// They pressed the first button.
{
switch(dialogid)// If you only have one dialog, then this isn't required, but it's neater for when you implement more dialogs.
{
case 1:// Our dialog!
{
switch(listitem)// Checking which listitem was selected
{
case 0:// The first item listed
{
if(PlayerInfo[playerid][pTeam] == 0)
{
SetPlayerTeam(playerid, 1);
PlayerInfo[playerid][pTeam] = 1;
SpawnPlayer(playerid);
}
}
case 1: // The second item listed
{
if(PlayerInfo[playerid][pTeam] == 1)
{
PlayerInfo[playerid][pTeam] = 0;
SetPlayerTeam(playerid, 0);
SpawnPlayer(playerid);
}
}
}
}
}
Re: Help with /changeteam -
prooftzm - 05.07.2014
Dziugas thx. i will try that now. BTW i fix the problem with dialogs id

I will reply with the answer. if is good or nah.
Re: Help with /changeteam -
prooftzm - 05.07.2014
THX a lot dziugas

respect man
Re: Help with /changeteam -
Dziugsas - 05.07.2014
Glad i helped.(You dont see that very often

DDDD).