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



Bandana System Bug - Wingman - 12.06.2015

Here is my bandana system script
Quote:

if(strcmp(cmd, "/bandana", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMember] == 15) // your factions id here
{
SetPlayerAttachedObject(playerid, 0, 18912, 2, 0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754);
SendClientMessage(playerid, COLOR_GREEN, "Use /bandanaoff to take it off");
}
else if(PlayerInfo[playerid][pMember] == 1) // your factions id here
{
RemovePlayerAttachedObject(playerid,0);
}
else
{
SendClientMessage(playerid, COLOR_RED, "You are not a faction member");
}
}
return 1;
}
if(strcmp(cmd,"/bandanaoff", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerAttachedObjectSlotUsed(playerid, 0))
{
RemovePlayerAttachedObject(playerid, 0);
SendClientMessage(playerid, COLOR_RED, "You removed your bandana");
}
}
return 1;

I want to know how to make a cmd which takes a player setted color (/setgangcolor [Color] which please should restricted to R6 gang members ) and when it gets that setted color it does SetPlayerColor to hex value of which color it said. Will +Rep


Re: Bandana System - Wingman - 12.06.2015

i want as FS and i defined all colors btw


Re: Bandana System - DarkLouis - 12.06.2015

You need to check if Faction ID == "Ex. Ballas" ---> SetPlayerAttachedObject (bandana color purple)


Re: Bandana System - Wingman - 12.06.2015

More Specific Please, That would give me an error and i know that without even implementing it.