LVRCR 1.6a Wanted Level Issue
#1

Okay, ive been changing just about everything in this script. Im not very good at scripting, I am a noobidian. But, Its all be working until now, I have a set wanted level issue. I just cant see what the problem is...

Here is the result : TEAM_AGENT,NEO,OR SMITH is stopping the wanted level.
It supposed to make anyone wanted for robbing the store/casino. I want them to rob it without getting wanted.

Код:
if(GetPlayerVirtualWorld(playerid) == 6 && twofoursevenrobbed6 == 0) {
    new robbber[30];
    new pcol = GetPlayerColor(playerid);
    GetPlayerName(playerid,robbber,30);
    new plwl = GetPlayerWantedLevel(playerid);
	  SetPlayerWantedLevel(playerid, plwl +4);
		robbingstore[playerid] =20;
		twofoursevenrobbed6 = 240;
		SendClientMessage(playerid,0x00C7FFAA,"Starting robbery. The Police have been advised and will be dispatched to this store");
		SendClientMessage(playerid,0x00C7FFAA,"Stay in the checkpoint to complete the robbery...");
		plwl = GetPlayerWantedLevel(playerid);
    if(gTeam[playerid] == TEAM_AGENT || TEAM_NEO || TEAM_SMITH)
		GetPlayerWantedLevel(playerid);
		SetPlayerWantedLevel(playerid, plwl =0);
		SendClientMessage(playerid, 0xA9A9A9AA, "|_Crime Commited_|");
		format(string, sizeof(string), "(24/7 STORE ROBBERY) Wanted Level %d",plwl);
		SendClientMessage(playerid,pcol,string);
		commitedcrimerecently[playerid] +=120;
		if(robberrank[playerid] <=39) {
  	SendClientMessage(playerid,COLOR_WHITE,"Your robbing skill level has been increased. Type /robskill for more info");
  	robberrank[playerid] +=1;
		}
		printf("%s(%d) has started a 24/7 robbery in Spiny Bed",robbber,playerid);
		for(new i=0;i<MAX_PLAYERS;i++)
		{
    if(LawEnforcementRadio[i] == 1) {
    new string1[256];
    new string2[256];
		format(string1, sizeof(string1), "DISPATCH: (STORE ROBBERY IN PROGRESS) Suspect: %s(%d)", robbber,playerid);
		format(string2, sizeof(string2), "ALL UNITS: Please respond to the 24/7 store in Spiny Bed and arrest %s(%d)", robbber,playerid);
		SendClientMessage(i, COLOR_ROYALBLUE, string1);
		SendClientMessage(i, COLOR_ROYALBLUE, string2);
	  }
	  }
	  }
		}
		}
		return 1;
 	}
ADD - When i did it like this, the agents didnt get wanted, but neo and smith do. and i think agents get wanted on 2nd rob...

Код:
	plwl = GetPlayerWantedLevel(playerid);
    if(gTeam[playerid] == TEAM_AGENT)
		SetPlayerWantedLevel(playerid, plwl =0);
		if(gTeam[playerid] == TEAM_NEO)
 		GetPlayerWantedLevel(playerid);
		SetPlayerWantedLevel(playerid, plwl =0);
	    if(gTeam[playerid] == TEAM_SMITH)
 		GetPlayerWantedLevel(playerid);
		SetPlayerWantedLevel(playerid, plwl =0);
		SendClientMessage(playerid, 0xA9A9A9AA, "|_Crime Commited_|");
		format(string, sizeof(string), "(CASINO ROBBERY) Wanted Level %d",plwl);
		SendClientMessage(playerid,pcol,string);
	  GivePlayerMoney(playerid, mrand);
	  RobbedCasRecent[playerid] =1;
	  oscore = GetPlayerScore(playerid);
	  SetPlayerScore(playerid, oscore +1);
    FourDragsRobbed =1;
    if(robberrank[playerid] >=20 && robberrank[playerid] <=29) {
  	SendClientMessage(playerid,COLOR_WHITE,"Your robbing skill level has been increased. Type /robskill for more info");
  	robberrank[playerid] +=1;
		}
Reply
#2

Post in the topic of the lvrcr GM..
Reply
#3

Quote:
Originally Posted by Avenue
Post in the topic of the lvrcr GM..
Isnt this scripting discusion? and he try to learn scripting ?

Anyway agent check this out..

Код:
if(GetPlayerVirtualWorld(playerid) == 6 && twofoursevenrobbed6 == 0) {
    new robbber[30];
    new pcol = GetPlayerColor(playerid);
    GetPlayerName(playerid,robbber,30);
    new plwl = GetPlayerWantedLevel(playerid);
	  SetPlayerWantedLevel(playerid, plwl +4);
		robbingstore[playerid] =20;
		twofoursevenrobbed6 = 240;
		SendClientMessage(playerid,0x00C7FFAA,"Starting robbery. The Police have been advised and will be dispatched to this store");
		SendClientMessage(playerid,0x00C7FFAA,"Stay in the checkpoint to complete the robbery...");
		plwl = GetPlayerWantedLevel(playerid);
		GetPlayerWantedLevel(playerid);
		SetPlayerWantedLevel(playerid, plwl =0);
		SendClientMessage(playerid, 0xA9A9A9AA, "|_Crime Commited_|");
		format(string, sizeof(string), "(24/7 STORE ROBBERY) Wanted Level %d",plwl);
		SendClientMessage(playerid,pcol,string);
		commitedcrimerecently[playerid] +=120;
		if(robberrank[playerid] <=39) {
  	SendClientMessage(playerid,COLOR_WHITE,"Your robbing skill level has been increased. Type /robskill for more info");
  	robberrank[playerid] +=1;
		}
		printf("%s(%d) has started a 24/7 robbery in Spiny Bed",robbber,playerid);
		for(new i=0;i<MAX_PLAYERS;i++)
		{
  if(gTeam[playerid] == TEAM_AGENT || gTeam[playerid] == TEAM_NEO ) {
SetPlayerWantedLevel(playerid, plwl -4);
	return 1;
 	}
    if(LawEnforcementRadio[i] == 1) {
    new string1[256];
    new string2[256];
		format(string1, sizeof(string1), "DISPATCH: (STORE ROBBERY IN PROGRESS) Suspect: %s(%d)", robbber,playerid);
		format(string2, sizeof(string2), "ALL UNITS: Please respond to the 24/7 store in Spiny Bed and arrest %s(%d)", robbber,playerid);
		SendClientMessage(i, COLOR_ROYALBLUE, string1);
		SendClientMessage(i, COLOR_ROYALBLUE, string2);
	  }
	  }
	  }
		}
		}
		return 1;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)