Cop help
#1

Alright... So in my game mode when a cop makes /duty he goes off it and it changes his skin to normal but when he goes ON duty it changes him to cj skin, Any ideas? (I added that when a cop does /duty it changes his skin to the selected rank skin that i added )
Reply
#2

Post your script..?
Reply
#3

Код:
	if(strcmp(cmd, "/duty", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(PlayerInfo[playerid][pWanted] == 1) return SendClientMessage(playerid, COLOR_GREY, "* Criminals can not go on duty!");
			if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember] == 3 || IsAFreecop(playerid))
			{
				if(PlayerInfo[playerid][pDBanned] == 1)
				{
					SendClientMessage(playerid, COLOR_GREY, "* You are Banned from Cop Duty!");
					return 1;
				}
				if (IsPlayerInRangeOfPoint(playerid, 6,255.3,77.4,1003.6) || IsPlayerInRangeOfPoint(playerid, 6,223.6328,186.8251,1003.0313) || IsPlayerInRangeOfPoint(playerid, 6, 233.4989,123.6518,1003.2188) || PlayerInfo[playerid][pLocal] != 255)
				{
					if(PlayerInfo[playerid][pDuty] == 0)
			        {
			            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);
							PlayerInfo[playerid][pDuty] = 1;
							PlayerInfo[playerid][pChar] = 71;
							new factionskin = PlayerInfo[playerid][pChar];
    						SetPlayerSkin(playerid, 280);
    						SaveGuns(playerid);
							return 1;
						}
			            if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
			            {
				    		format(string, sizeof(string), "* Officer %s took a Badge and a Gun from his locker.", sendername);
				    		SendClientMessage(playerid, COLOR_WHITE, "Type /equip for equipments // Type /undercover to see UC Skins!");
				    		
                            SetPlayerSkin(playerid, 280);
                            SafeGivePlayerWeapon(playerid, 24, 300);
                            SafeGivePlayerWeapon(playerid, 31, 300);
                            SafeGivePlayerWeapon(playerid, 29, 300);
                            SafeGivePlayerWeapon(playerid, 41, 300);
                            SafeGivePlayerWeapon(playerid, 27, 100);
Reply
#4

Well, once he heads on duty you set a player variable to 1 and once he heads off duty you set the player variable to 0 and set the CJ skin. If you scripted the script you posted already then you should also be able to script that.
Reply
#5

He didn't make this. this is a straight copy from GodFather
Reply
#6

Show the code, we cannot read your script
Reply
#7

Yep, GF. But, i fixed it myself sometime ago, by just deleting the skin saving thing, and adding there automaticly a skin added when doing /duty. (I used skin ID 280) You can do that for every rank different, however u want. :P
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)