22.05.2014, 12:27
Hi there!
Good Day
How do i make the player wanted level on 3 when they attempting to rob the bank and make the wanted level to 6 when they finished robbing the bank. And also it should be shown in /wanted list (for cops)
Others CMD that make player shown in /wanted list
THANK YOU VERY MUCH,
I REALLY PROMISE I WILL GIVE AN +REP TO A GUY WHO CAN HELP ME!!
Respectfully Yours,
Trynda
Good Day
How do i make the player wanted level on 3 when they attempting to rob the bank and make the wanted level to 6 when they finished robbing the bank. And also it should be shown in /wanted list (for cops)
Код:
public robtimer(playerid) { new string[128];//We are defining a new string for the formatted message that we are displaying later on. new cash = random(2000000); GivePlayerMoney(playerid, cash); /* With the fuction above 'new cash = random(200000); GivePlayerMoney(playerid, cash);' we give the player a random amount of money from $0 - $200,000 */ //Here below we use the string we defined above to format the message itself and display it to the player. format(string, sizeof(string), "You have successfully robbed $%d from the bank!", cash); SendClientMessage(playerid, COLOR_WHITE, string); format(string, sizeof(string), "[BREAKING NEWS] The suspect %s has successfully rob the money bank", GetPlayerNameEx(playerid)); SendClientMessageToAll(0x008000FF, string); }
Код:
CMD:robbank(playerid, params[]) { if(robpossible == 1) //If the bank can be robbed we continue below { if(IsPlayerInRangeOfPoint(playerid, 3.0, 2319.2310,-2.0349,26.7496)) {//Next thing we do is, we check if we are at the bank interior ^^ robpossible = 0; //Then we set the bank so it cannot be robbed SetTimer("waittimer", 900000, false); //Normal Mode 5 minutes /*We run the timer(5 minutes) for the function that is going to make the bank available for robbing again */ //SetTimer("waittimer", 65000, false); //Test Mode 65 seconds SetTimer("robtimer", 300000, false); /* We also run another timer(1 minute) for the function that is actually going to give us the money and a user friendly message. */ /* Add a function that would notify the police. */ SendClientMessageToAll(0x00FF00FF,"[BREAKING NEWS] Bank is being robbed, do not come near the bank!"); SendClientMessageToAll(0x0080FFFF, "Alerting all POLICE to come at bank As Soon as possible!!!"); SendClientMessageToAll(0x0080FFFF, "Lahat ng police PUMUNTA sa BANK Ngayon din!!!"); SendClientMessage(playerid, 0xFF0000FF, "You are robbing the bank, the police has been notified!"); SendClientMessage(playerid, 0x008000FF, "You gotta stay 5 minutes before you get the moneys!!!"); } else return SendClientMessage(playerid, COLOR_WHITE, "You are not in BANK SAFE!!"); } else { SendClientMessage(playerid, COLOR_WHITE, "You can't rob the bank right now! Already rob or waiting for cool down"); } return 1; }
Код:
CMD:wanted(playerid, params[]) { if(IsACop(playerid) || IsInLSFMD(playerid) || PlayerInfo[playerid][pJob] == 2 || PlayerInfo[playerid][pJob2] == 2 || PlayerInfo[playerid][pFaction] == 5 && PlayerInfo[playerid][pDivision] == 5 || PlayerInfo[playerid][pFaction] == 5 && PlayerInfo[playerid][pDivision] == 2) { new string[128], x; SendClientMessage(playerid, COLOR_GREEN, "Current Wanted Suspects:"); foreach(Player, i) { if(PlayerInfo[i][pWantedLevel] >= 1) { format(string, sizeof(string), "%s%s: %d", string,GetPlayerNameEx(i),PlayerInfo[i][pWantedLevel]); x++; if(x > 3) { SendClientMessage(playerid, COLOR_YELLOW, string); x = 0; format(string, sizeof(string), " "); } else { format(string, sizeof(string), "%s, ", string); } } } if(x <= 3 && x > 0) { string[strlen(string)-2] = '.'; SendClientMessage(playerid, COLOR_YELLOW, string); } } else { SendClientMessage(playerid, COLOR_GREY, " You're not a Lawyer / Cop / FBI!"); } return 1; }
Код:
CMD:su(playerid, params[]) { if(IsACop(playerid) || PlayerInfo[playerid][pFaction] == 5 && PlayerInfo[playerid][pDivision] == 5 || PlayerInfo[playerid][pFaction] == 5 && PlayerInfo[playerid][pDivision] == 2) { if(PlayerInfo[playerid][pJailed] > 0) { return SendClientMessage(playerid, COLOR_WHITE, "You can't use this in jail/prison."); } new iTargetID, szCrime[64]; if(sscanf(params, "us[64]", iTargetID, szCrime)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: (/su)spect [playerid/partofname] [crime description]"); } else if(!IsPlayerConnected(iTargetID)) { SendClientMessage(playerid, COLOR_GRAD1, "Invalid player specified."); } else if(IsACop(iTargetID)) { SendClientMessage(playerid, COLOR_GREY, "You can't use this command on a law enforcement officer."); } else if(PlayerInfo[iTargetID][pFaction] == 5) { SendClientMessage(playerid, COLOR_GREY, "This person has diplomatic immunity."); } else if(PlayerInfo[iTargetID][pWantedLevel] >= 6) { SendClientMessage(playerid, COLOR_GRAD2, "Target is already most wanted."); } else { new szMessage[128]; ++PlayerInfo[iTargetID][pCrimes]; SetPlayerWantedLevel(iTargetID, ++PlayerInfo[iTargetID][pWantedLevel]); if(PlayerInfo[iTargetID][pWantedLevel] > 5) { SetPlayerColor(iTargetID, WANTED_COLOR); } format(szMessage, sizeof(szMessage), "You've commited a crime (%s), reporter: %s.", szCrime, GetPlayerNameEx(playerid)); SendClientMessage(iTargetID, COLOR_LIGHTRED, szMessage); format(szMessage, sizeof(szMessage), "Current wanted level: %d", PlayerInfo[iTargetID][pWantedLevel]); SendClientMessage(iTargetID, COLOR_YELLOW, szMessage); foreach(Player, i) if(IsACop(i) || PlayerInfo[i][pFaction] == 5 && PlayerInfo[i][pDivision] == 5 || PlayerInfo[playerid][pFaction] == 5 && PlayerInfo[playerid][pDivision] == 2) { format(szMessage, sizeof(szMessage), "HQ: All units APB (reporter: %s)",GetPlayerNameEx(playerid)); SendClientMessage(i, TEAM_BLUE_COLOR, szMessage); format(szMessage, sizeof(szMessage), "HQ: Crime: %s, suspect: %s", szCrime, GetPlayerNameEx(iTargetID)); SendClientMessage(i, TEAM_BLUE_COLOR, szMessage); } } } else SendClientMessage(playerid, COLOR_GRAD2, "You're not a law enforcement officer."); return 1; }
I REALLY PROMISE I WILL GIVE AN +REP TO A GUY WHO CAN HELP ME!!
Respectfully Yours,
Trynda