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;
}
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);
SetPlayerWantedLevel(playerid, 3);
PlayerInfo[playerid][pWantedLevel] = 3;
/* 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;
}
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);
SetPlayerWantedLevel(playerid, 6);
PlayerInfo[playerid][pWantedLevel] = 6;
}
|
PHP код:
PHP код:
|
enum pInfo
{
pKey[129],
pLevel,
pAdmin,
pAdminName[32],
pBanAppealer,
pGangMod,
pDonator,
pBanned,
pPermaBanned,
pDisabled,
pIP[16],
pReg,
pTut,
pSex,
pAge,
pSkin,
Float:pPos_x,
Float:pPos_y,
Float:pPos_z,
Float:pPos_r,
pConnectTime,
pRespect,
pNumber,
pWarns,
pGang,
pFaction,
pLeader,
pRank,
pJob,
pJob2,
gPupgrade,
Float:pSarmor,
pCash,
pBank,
pInsurance,
pCrimes,
pArrested,
pWantedLevel,
Float:pHealth,
Float:pArmor,
pPot,
pCrack,
pPackages,
pCrates,
pRadio,
pRadioFreq,
pPhoneBook,
pDice,
pCDPlayer,
pMats,
pRope,
pCigar,
pSprunk,
pSpraycan,
pHouse,
pHouse2,
pRenting,
pInt,
pVW,
pJailed,
pJailTime,
pGuns[12],
pAGuns[12],
pPayCheck,
pPayReady,
pHospital,
pDetSkill,
pLawSkill,
pSexSkill,
pDrugsSkill,
pSmugSkill,
pArmsSkill,
pMechSkill,
pFishSkill,
pBoxSkill,
pTruckSkill,
pCarSkill,
//pCraftSkill,
pLawyerTime,
pLawyerFreeTime,
pDrugsTime,
pMechTime,
pSexTime,
pCarTime,
pFishes,
pBiggestFish,
pLockCar, // non-saved
pWeedObject,
Float: pWeedPos[3],
pWeedVW,
pWeedInt,
pWeedGrowth,
pWSeeds,
pWins,
pLoses,
pFightStyle,
pScrewdriver,
pSmslog,
pWristwatch,
pTire,
pFirstaid,
pRccam,
pReceiver,
pGPS,
pSweep,
pSweepLeft,
pBugged,
pVehicleKeys,
pVehicleKeysFrom,
pDuty,
pCarLic,
pFlyLic,
pBoatLic,
pFishLic,
pGunLic,
pDivision,
pLiveBanned,
pTicketTime,
pHeadValue,
pContractBy[32],
pContractDetail[64],
pC4,
pC4Get,
pC4Used,
pBombs,
pCHits,
pFHits,
pPrisonedBy[MAX_PLAYER_NAME],
pPrisonReason[128],
pAcceptReport,
pTrashReport,
pAccent,
pNMute,
pNMuteTotal,
pADMute,
pADMuteTotal,
pRMuted,
pRMutedTotal,
pRMutedTime,
pSpeedo,
pGCMuted,
pGCMutedTime,
pCallsAccepted,
pHelper,
pPatientsDelivered,
pTriageTime,
pMarried,
pMarriedTo[MAX_PLAYER_NAME],
pKillLog0[128],
pKillLog1[128],
pKillLog2[128],
pKillLog3[128],
pKillLog4[128],
pKillLog5[128],
pKillLog6[128],
pKillLog7[128],
pKillLog8[128],
pKillLog9[128],
pFlag[128],
pReferredBy[MAX_PLAYER_NAME],
pTokens,
pRefTokensOffline,
};
SetPlayerWantedLevel(playerid, 3);
PlayerInfo[playerid][pWantedLevel] = 3;