04.10.2011, 22:01
hey guys, in the server im editing a bit im trying to make it so that player names for certain factions are different...such as cops being blue, firemen being red...etc...now normally "setplayercolor" would work for this, but in this server there is a proxdetector that is messing with me just being able to set player color....i found the freecop code and tried changing the setplayercolor to blue but it was a no go.....so then someone mentioned something about a proxdetector that was in the script....im not positive how it works completely so i have no idea where to start looking to change faction colors...maybe if you see this peice of script someone can guide me a little.....rep+ for helping out....
so im assuming after a little bit of forum help that this line;
"ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,CO LOR_CHAT5);"
is what is messing with me and not allowing me to change player colors....i tried just deleting it to see if i setplaycolor would start working....no luck again...
i also tried making a define for the color blue and placing that in the procdetector line by adding a COLOR_CHAT6 option and defining it as blue and then turning the prox line to ,
"ProxDetector(30.0, playerid, string, COLOR_CHAT6,COLOR_CHAT6,COLOR_CHAT6,COLOR_CHAT6,CO LOR_CHAT6);"
but that didnt work either...IM SO LOST....
...any idea guys? its Ravens RP if that makes things easier
pawn Код:
if(IsAFreecop(playerid))
{
format(string, sizeof(string), "* Voluntary Officer %s took a Badge and a Gun from his locker.", sendername);
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
SafeResetPlayerWeapons(playerid);
SafeGivePlayerWeapon(playerid, 41, 150);
SafeGivePlayerWeapon(playerid, 24, 70);
SafeGivePlayerWeapon(playerid, 3, 0);
SetPlayerColor(playerid,0xa9c4e400); <--tried turning this to blue,no luck
PlayerInfo[playerid][pDuty] = 1;
PlayerInfo[playerid][pChar] = 71;
new factionskin = PlayerInfo[playerid][pChar];
SetPlayerSkin(playerid, factionskin);
SaveGuns(playerid);
return 1;
so im assuming after a little bit of forum help that this line;
"ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,CO LOR_CHAT5);"
is what is messing with me and not allowing me to change player colors....i tried just deleting it to see if i setplaycolor would start working....no luck again...
i also tried making a define for the color blue and placing that in the procdetector line by adding a COLOR_CHAT6 option and defining it as blue and then turning the prox line to ,
"ProxDetector(30.0, playerid, string, COLOR_CHAT6,COLOR_CHAT6,COLOR_CHAT6,COLOR_CHAT6,CO LOR_CHAT6);"
but that didnt work either...IM SO LOST....
