24.12.2014, 13:58
pawn Код:
dcmd_bankrob(playerid, params[])
{
#pragma unused params
if(!PlayerInfo[playerid][pSpawn]) return SendClientMessage(playerid, COLOR_ERROR, "You Cannot Use This Command When You're Dead.");
if(PlayerInfo[playerid][pTeam] != TEAM_CIVILIAN || PlayerInfo[playerid][pVigilante]) return SendClientMessage(playerid, COLOR_ERROR, "Law Enforcement Agents Cannot Rob Places.");
if(!GetPlayerVirtualWorld(playerid)) return SendClientMessage(playerid, COLOR_ERROR, "You Must Be Inside A Bank To Begin A Robbery.");
//if(PlayerInfo[playerid][pWantedLevel]) return SendClientMessage(playerid,COLOR_ERROR, "You Must Be Innocent To Begin A Holdup.");
if(PlayerInfo[playerid][pJailed] || PlayerInfo[playerid][pAJailed]) return SendClientMessage(playerid, COLOR_ERROR, "You Cannot Use This Command In Jail.");
if(PlayerInfo[playerid][pHoldup]) return SendClientMessage(playerid, COLOR_ERROR, "You Are Currently Robbing The Store. Exit The Checkpoint To End The Holdup.");
if(PlayerInfo[playerid][pHoldupWaitTime]) return SendClientMessage(playerid, COLOR_ERROR, "Please Wait Before Robbing A Store Again.");
new Houseid = PlayerInfo[playerid][pCheckpoint];
if(HouseData[Houseid][h_RobWaitTime]) return SendClientMessage(playerid, COLOR_ERROR, "This Location Has Been Robbed Recently. Try Again Later.");
HouseData[Houseid][h_RobWaitTime] = 60;
PlayerInfo[playerid][pHoldup] = 30;
PlayerInfo[playerid][pHoldupWaitTime] = 60;
PlayerInfo[playerid][pHoldupAmount] = 0;
strmid(PlayerInfo[playerid][pHoldupVictim], "The Bank", 0, 128, 12;
PlayerInfo[playerid][pWantedLevel] = 6;
PlayerInfo[playerid][pRobberies] ++;
HideTextDrawMenu(playerid);
PlayerInfo[playerid][pMission] = MISSION_TYPE_BANK_ROBBERY_1;
PlayerInfo[playerid][pRaceCheckpoint] = 0;
ApplyAnimation(playerid, "SHOP", "ROB_Shifty", 3.0, 0, 0, 0, 0, 0, 1);
SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, "Beginning Bank Robbery... Exit The Checkpoint To End The Robbery.");
GameTextForPlayer(playerid,"~w~BEGINNING ROBBERY~n~~y~STAY IN THE~n~~r~RED CHECKPOINT", 5000, 3);
SetPlayerScore(playerid,GetPlayerScore(playerid) + 1);
format(string, sizeof(string), "Crime: Robbery In Progress");
ReportCrimeTOPolice(playerid,string);
SetPlayerWantedStats(playerid,"Robbery");
/*
else
{
format(string, sizeof(string), "You Can Only Rob The Bank In %s While Playing %s.",ServerInfo[sMapName],ServerInfo[sMapName]);
SendClientMessage(playerid, COLOR_ERROR, string);
}*/
return 1;
}
pawn Код:
}else{
format(string, sizeof(string), "You Can Only Rob The Bank In %s While Playing %s.",ServerInfo[sMapName],ServerInfo[sMapName]);
SendClientMessage(playerid, COLOR_ERROR, string);
}
}else{
SendClientMessage(playerid, COLOR_ERROR, "You Must Be Inside A Bank To Begin A Robbery.");
}
pawn Код:
if (GetPlayerVirtualWorld(playerid) > 0)
{