SA-MP Forums Archive
Gang - 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: Gang (/showthread.php?tid=663095)



Gang - SeeNN - 21.01.2019

When I changed the color of my gang,happend something,I don't know why I'm not respawn on my gang position when I write "/spawnme"

Ph: https://imgur.com/a/r9dLHXg

HTML Code:
CMD:gcolor(playerid, params[])
{
    if(CosminInfo[playerid][g_Rank] < 9) return SendError2(playerid, "{E4EDF4}You need to be Gang Rank 9 to use this command", "{E4EDF4}Trebuie sa ai Rank 9 in Gang pentru a folosi aceasta comanda");
    //--------------------------------------------------------------------------
    if(sscanf(params, "h", params[0])) return SendUsage(playerid, "/gcolor [Color Code]");
    //--------------------------------------------------------------------------
    //for(new i = 0; i < MAX_GANGS; i++) if(GangInfo[i][GangColor] == SetPlayerColor(i, params[0])) return SendError2(playerid, "{E4EDF4}Sorry,but the selected color are using some gang. Please select another", "{E4EDF4}Scuze,dar aceasta culoare este folosita de alt gang,te rog sa incerci alta");
    //--------------------------------------------------------------------------
    {
           params[0] = (params[0] * 256) + 0xAA;
		   //-------------------------------------------------------------------
		   GangInfo[CosminInfo[playerid][GangID]][GangColor] = params[0], Announce(playerid, "~w~~h~Gang color have been ~n~~g~~h~updated~w~~h~.", 3000, 4);
		   //foreach(new i : Player) SetPlayerColor(i, params[0] = GangInfo[i][GangColor]), Announce(playerid, "~w~~h~Gang color have been ~n~~g~~h~updated~w~~h~.", 3000, 4);
           //-------------------------------------------------------------------
           eString[0] = EOS;
           //-------------------------------------------------------------------
           format(eString, sizeof eString, "GANG: {E4EDF4}Founder '{FFFF00}%s{E4EDF4}' has set a new color to your gang.", PlayerName(playerid));
           SendGangMessage(CosminInfo[playerid][GangID], eString);
           //-------------------------------------------------------------------
           foreach(new i : Player) if(CosminInfo[playerid][GangID] == CosminInfo[i][GangID]) SetPlayerColor(i, params[0]);
           //-------------------------------------------------------------------
    }
	return 1;
}



Re: Gang - MP2 - 22.01.2019

The code you posted seems to be for /gcolor not /spawnme. We need to see /spawnme.


Re: Gang - SeeNN - 22.01.2019

Quote:
Originally Posted by MP2
View Post
The code you posted seems to be for /gcolor not /spawnme. We need to see /spawnme.
I have problem with /gcolor,not with "/spawnme",the command work great. When I use /gcolor,don't spawn me on my gang even if I die. And the color of gang don't change.


Re: Gang - IceBilizard - 22.01.2019

/gcolor is command for gang color it will not spawn you in your team spawn problem is in command /spawnme show the code of /spawnme command