Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- //Don't Steal.
- #define FILTERSCRIPT
- forward IsAtClothShop(playerid);
- forward IsAtGasStation(playerid);
- forward IsAtBar(playerid);
- forward IsAtBank(playerid);
- forward IsAtCash(playerid);
- forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
- forward rob(id);
- forward split(const strsrc[], strdest[][], delimiter);
- forward re(index);
- forward IsACop(playerid);
- forward GetCops();
- forward ruf(str[], id);
- forward Wait(time);
- forward zu(id);
- forward SetAmm(bizzid,summant);
- new gbl_robber_status[MAX_PLAYERS];
- new gbl_L[7200];
- new Float:gbl_LX[7200];
- new Float:gbl_LY[7200];
- new Float:gbl_LZ[7200];
- new cops[200];
- new cops_on;
- //zurοΏ½cktimer
- new amm_arr[MAX_PLAYERS];
- new b_arr[MAX_PLAYERS];
- new ungueltig[MAX_PLAYERS];
- public split(const strsrc[], strdest[][], delimiter)
- {
- new i, li;
- new aNum;
- new len;
- while(i <= strlen(strsrc)){
- if(strsrc[i]==delimiter || i==strlen(strsrc)){
- len = strmid(strdest[aNum], strsrc, li, i, 128);
- strdest[aNum][len] = 0;
- li = i+1;
- aNum++;
- }
- i++;
- }
- return 1;
- }
- public Wait(time)
- {
- new stamp = tickcount();
- while (tickcount() - stamp < time){}
- return 1;
- }
- stock ini_GetKey( line[] )
- {
- new keyRes[256];
- keyRes[0] = 0;
- if ( strfind( line , "=" , true ) == -1 ) return keyRes;
- strmid( keyRes , line , 0 , strfind( line , "=" , true ) , sizeof( keyRes) );
- return keyRes;
- }
- stock ini_GetValue( line[] )
- {
- new valRes[256];
- valRes[0]=0;
- if ( strfind( line , "=" , true ) == -1 ) return valRes;
- strmid( valRes , line , strfind( line , "=" , true )+1 , strlen( line ) , sizeof( valRes ) );
- return valRes;
- }
- public ruf(str[], id){
- new Float:x, Float:y, Float:z;
- for(new i=0;i<MAX_PLAYERS;i++){
- if(cops[i] == 1){
- GameTextForPlayer(i,str,5000, 1);
- GetPlayerPos(id, x, y, z);
- if(IsAtBank(id)==20000){
- if(GetPlayerVirtualWorld(id) == 2){
- SetPlayerCheckpoint(i, -1783.8413,572.3282,35.1641, 1);
- }else{
- SetPlayerCheckpoint(i, 2375.456298, 2307.444335, 8.140600, 1);
- }
- }else if(IsAtGasStation(id) >= 2000){
- SetPlayerCheckpoint(i, x, y, z, 1);
- } else {
- }
- }
- }
- return true;
- }
- public zu(id){
- if(ungueltig[id]==0){
- amm_arr[id] = 0;
- b_arr[id] = 0;
- }else{
- ungueltig[id]=0;
- }
- return true;
- }
- public GetCops(){
- cops_on = 0;
- for(new i=0;i<MAX_PLAYERS;i++){
- if(IsPlayerConnected(i))
- {
- if(IsACop(i)){
- cops[i] = 1;
- cops_on++;
- }else{
- cops[i] = 0;
- }
- }
- }
- }
- public IsACop(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- new mem, lea;
- new string2[64];
- new playername2[MAX_PLAYER_NAME];
- GetPlayerName(playerid, playername2, sizeof(playername2));
- format(string2, sizeof(string2), "%s.ini", playername2);
- new File: UserFile = fopen(string2, io_read);
- if ( UserFile )
- {
- new key[ 256 ] , val[ 256 ];
- new Data[ 256 ];
- while ( fread( UserFile , Data , sizeof( Data ) ) )
- {
- key = ini_GetKey( Data );
- if( strcmp( key , "Leader" , true ) == 0 ) { val = ini_GetValue( Data ); lea = strval( val ); }
- if( strcmp( key , "Member" , true ) == 0 ) { val = ini_GetValue( Data ); mem = strval( val ); }
- }//end while
- fclose(UserFile);//close the file after everything has been read in the while
- }
- if(( (mem > 0) && (mem < 4) || mem==15 )||( (lea > 0) && (lea < 4) ) || lea==15) { return 1;}
- else { return 0;}
- }else{
- return 0;
- }
- }
- public re(index){
- gbl_L[index] = 0;
- gbl_LX[index] = 0.0000;
- gbl_LY[index] = 0.0000;
- gbl_LZ[index] = 0.0000;
- return 0;
- }
- public rob(id){
- new string[256];
- if(IsAtGasStation(id) >= 1000)
- {
- TogglePlayerControllable(id, 1);
- ClearAnimations(id);
- GivePlayerMoney(id, IsAtGasStation(id));
- format(string, sizeof(string), "Du hast %i$ erbaeutet!", IsAtGasStation(id));
- GameTextForPlayer(id,string,5000,3);
- amm_arr[id] = IsAtGasStation(id);
- b_arr[id] = 2;
- SetAmm(203,(-1)*IsAtGasStation(id));
- SetTimerEx("zu", 5*60000, false, "i", id);
- }
- else if(IsAtBar(id) >= 100)
- {
- TogglePlayerControllable(id, 1);
- ClearAnimations(id);
- GivePlayerMoney(id, IsAtBar(id));
- format(string, sizeof(string), "Du hast %i$ erbaeutet!", IsAtBar(id));
- GameTextForPlayer(id,string,5000,3);
- amm_arr[id] = IsAtBar(id);
- SetTimerEx("zu", 5*60000, false, "i", id);
- }
- else if(IsAtClothShop(id) >= 750)
- {
- TogglePlayerControllable(id, 1);
- ClearAnimations(id);
- GivePlayerMoney(id, IsAtClothShop(id));
- format(string, sizeof(string), "Du hast %i$ erbaeutet!", IsAtClothShop(id));
- GameTextForPlayer(id,string,5000,3);
- amm_arr[id] = IsAtClothShop(id);
- SetTimerEx("zu", 5*60000, false, "i", id);
- }
- else if(IsAtCash(id) >= 2000)
- {
- TogglePlayerControllable(id, 1);
- ClearAnimations(id);
- GivePlayerMoney(id, IsAtCash(id));
- format(string, sizeof(string), "Du hast %i$ erbaeutet!", IsAtCash(id));
- GameTextForPlayer(id,string,5000,3);
- amm_arr[id] = IsAtCash(id);
- SetTimerEx("zu", 5*60000, false, "i", id);
- }
- else if(IsAtBank(id) == 20000)
- {
- ClearAnimations(id);
- GivePlayerMoney(id, IsAtBank(id));
- format(string, sizeof(string), "Du hast %i$ erbaeutet!", IsAtBank(id));
- GameTextForPlayer(id,string,5000,3);
- amm_arr[id] = IsAtBank(id);
- b_arr[id] = 1;
- SetAmm(4,(-1)*IsAtBank(id));
- SetTimerEx("zu", 5*60000, false, "i", id);
- }else{}
- gbl_robber_status[id] = 0;
- new Float:X, Float:Z, Float:Y,index;
- GetPlayerPos(id, X, Y, Z);
- for(new o=0; o<7200;o++){
- if(gbl_L[o] == 0){
- gbl_L[o] = GetPlayerVirtualWorld(id)+1;
- gbl_LX[o] = X;
- gbl_LY[o] = Y;
- gbl_LZ[o] = Z;
- index = o;
- o=7200;
- }
- }
- SetTimerEx("re", 3600000, false,"i",index);
- return 0;
- }
- public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
- {
- if(IsPlayerConnected(playerid))
- {
- new Float:oldposx, Float:oldposy, Float:oldposz;
- new Float:tempposx, Float:tempposy, Float:tempposz;
- GetPlayerPos(playerid, oldposx, oldposy, oldposz);
- tempposx = (oldposx -x);
- tempposy = (oldposy -y);
- tempposz = (oldposz -z);
- //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
- if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
- {
- return 1;
- }
- }
- return 0;
- }
- enum bInfo
- {
- bOwned,
- bOwner[64],
- bMessage[128],
- bExtortion[MAX_PLAYER_NAME],
- Float:bEntranceX,
- Float:bEntranceY,
- Float:bEntranceZ,
- Float:bExitX,
- Float:bExitY,
- Float:bExitZ,
- bLevelNeeded,
- bBuyPrice,
- bEntranceCost,
- bTill,
- bLocked,
- bInterior,
- bProducts,
- bMaxProducts,
- bPriceProd,
- };
- public SetAmm(bizzid,summant){
- new filen[256];
- new arrCoords[19][64];
- new strFromFile2[256];
- if(bizzid>200){
- filen="sbizz.cfg";
- bizzid=bizzid-200;
- new sBizzInfo[12][bInfo];
- new File: file = fopen(filen, io_readwrite);
- if (file)
- {
- new idx;
- while (idx < sizeof(sBizzInfo))
- {
- if(idx==bizzid){
- fread(file, strFromFile2);
- split(strFromFile2, arrCoords, '|');
- sBizzInfo[idx][bOwned] = strval(arrCoords[0]);
- strmid(sBizzInfo[idx][bOwner], arrCoords[1], 0, strlen(arrCoords[1]), 255);
- strmid(sBizzInfo[idx][bMessage], arrCoords[2], 0, strlen(arrCoords[2]), 255);
- strmid(sBizzInfo[idx][bExtortion], arrCoords[3], 0, strlen(arrCoords[3]), 255);
- sBizzInfo[idx][bEntranceX] = floatstr(arrCoords[4]);
- sBizzInfo[idx][bEntranceY] = floatstr(arrCoords[5]);
- sBizzInfo[idx][bEntranceZ] = floatstr(arrCoords[6]);
- sBizzInfo[idx][bExitX] = floatstr(arrCoords[7]);
- sBizzInfo[idx][bExitY] = floatstr(arrCoords[8]);
- sBizzInfo[idx][bExitZ] = floatstr(arrCoords[9]);
- sBizzInfo[idx][bLevelNeeded] = strval(arrCoords[10]);
- sBizzInfo[idx][bBuyPrice] = strval(arrCoords[11]);
- sBizzInfo[idx][bEntranceCost] = strval(arrCoords[12]);
- sBizzInfo[idx][bTill] = strval(arrCoords[13]);
- sBizzInfo[idx][bLocked] = strval(arrCoords[14]);
- sBizzInfo[idx][bInterior] = strval(arrCoords[15]);
- sBizzInfo[idx][bProducts] = strval(arrCoords[16]);
- sBizzInfo[idx][bMaxProducts] = strval(arrCoords[17]);
- sBizzInfo[idx][bPriceProd] = strval(arrCoords[18]);
- new coordsstring[256];
- format(coordsstring, sizeof(coordsstring), "%d|%s|%s|%s|%f|%f|%f|%f|%f|%f|%d|%d|%d|%d|%d|%d|%d|%d|%d\n",
- sBizzInfo[idx][bOwned],
- sBizzInfo[idx][bOwner],
- sBizzInfo[idx][bMessage],
- sBizzInfo[idx][bExtortion],
- sBizzInfo[idx][bEntranceX],
- sBizzInfo[idx][bEntranceY],
- sBizzInfo[idx][bEntranceZ],
- sBizzInfo[idx][bExitX],
- sBizzInfo[idx][bExitY],
- sBizzInfo[idx][bExitZ],
- sBizzInfo[idx][bLevelNeeded],
- sBizzInfo[idx][bBuyPrice],
- sBizzInfo[idx][bEntranceCost],
- sBizzInfo[idx][bTill]+summant,
- sBizzInfo[idx][bLocked],
- sBizzInfo[idx][bInterior],
- sBizzInfo[idx][bProducts],
- sBizzInfo[idx][bMaxProducts],
- sBizzInfo[idx][bPriceProd]);
- fwrite(file, coordsstring);
- }
- idx++;
- }
- fclose(file);
- }
- }else{
- filen="bizz.cfg";
- new BizzInfo[6][bInfo];
- new File: file = fopen(filen, io_readwrite);
- if (file)
- {
- new idx;
- while (idx < sizeof(BizzInfo))
- {
- if(idx==bizzid){
- fread(file, strFromFile2);
- split(strFromFile2, arrCoords, '|');
- BizzInfo[idx][bOwned] = strval(arrCoords[0]);
- strmid(BizzInfo[idx][bOwner], arrCoords[1], 0, strlen(arrCoords[1]), 255);
- strmid(BizzInfo[idx][bMessage], arrCoords[2], 0, strlen(arrCoords[2]), 255);
- strmid(BizzInfo[idx][bExtortion], arrCoords[3], 0, strlen(arrCoords[3]), 255);
- BizzInfo[idx][bEntranceX] = floatstr(arrCoords[4]);
- BizzInfo[idx][bEntranceY] = floatstr(arrCoords[5]);
- BizzInfo[idx][bEntranceZ] = floatstr(arrCoords[6]);
- BizzInfo[idx][bExitX] = floatstr(arrCoords[7]);
- BizzInfo[idx][bExitY] = floatstr(arrCoords[8]);
- BizzInfo[idx][bExitZ] = floatstr(arrCoords[9]);
- BizzInfo[idx][bLevelNeeded] = strval(arrCoords[10]);
- BizzInfo[idx][bBuyPrice] = strval(arrCoords[11]);
- BizzInfo[idx][bEntranceCost] = strval(arrCoords[12]);
- BizzInfo[idx][bTill] = strval(arrCoords[13]);
- BizzInfo[idx][bLocked] = strval(arrCoords[14]);
- BizzInfo[idx][bInterior] = strval(arrCoords[15]);
- BizzInfo[idx][bProducts] = strval(arrCoords[16]);
- BizzInfo[idx][bMaxProducts] = strval(arrCoords[17]);
- BizzInfo[idx][bPriceProd] = strval(arrCoords[18]);
- new coordsstring[256];
- format(coordsstring, sizeof(coordsstring), "%d|%s|%s|%s|%f|%f|%f|%f|%f|%f|%d|%d|%d|%d|%d|%d|%d|%d|%d\n",
- BizzInfo[idx][bOwned],
- BizzInfo[idx][bOwner],
- BizzInfo[idx][bMessage],
- BizzInfo[idx][bExtortion],
- BizzInfo[idx][bEntranceX],
- BizzInfo[idx][bEntranceY],
- BizzInfo[idx][bEntranceZ],
- BizzInfo[idx][bExitX],
- BizzInfo[idx][bExitY],
- BizzInfo[idx][bExitZ],
- BizzInfo[idx][bLevelNeeded],
- BizzInfo[idx][bBuyPrice],
- BizzInfo[idx][bEntranceCost],
- BizzInfo[idx][bTill]+summant,
- BizzInfo[idx][bLocked],
- BizzInfo[idx][bInterior],
- BizzInfo[idx][bProducts],
- BizzInfo[idx][bMaxProducts],
- BizzInfo[idx][bPriceProd]);
- fwrite(file, coordsstring);
- }
- idx++;
- }
- fclose(file);
- }
- }
- return true;
- }
- public IsAtBar(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerToPoint(4.0,playerid,495.7801,-76.0305,998.7578) || PlayerToPoint(4.0,playerid,499.9654,-20.2515,1000.6797))
- {//In grove street bar (with girlfriend), and in Havanna
- return 500;
- }
- else if(PlayerToPoint(4.0,playerid,1215.9480,-13.3519,1000.9219) || PlayerToPoint(10.0,playerid,-2658.9749,1407.4136,906.2734))
- {//PIG Pen
- return 1000;
- }
- }
- return 0;
- }
- public IsAtBank(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerToPoint(4.0,playerid,2305.688964,-16.088100,26.749599))
- {
- return 20000;
- }
- }
- return 0;
- }
- public IsAtCash(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerToPoint(1.0,playerid,1193.5065,-916.7116,43.1726) || PlayerToPoint(1.0,playerid,-1980.8181,145.1371,27.6875))
- {
- return 20000;
- }
- }
- return 0;
- }
- public IsAtClothShop(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerToPoint(25.0,playerid,207.5627,-103.7291,1005.2578) || PlayerToPoint(25.0,playerid,203.9068,-41.0728,1001.8047))
- {//Binco & Suburban
- return 250;
- }
- else if(PlayerToPoint(30.0,playerid,214.4470,-7.6471,1001.2109) || PlayerToPoint(50.0,playerid,161.3765,-83.8416,1001.8047))
- {//Zip & Victim
- return 500;
- }
- }
- return 0;
- }
- public IsAtGasStation(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerToPoint(6.0,playerid,1004.0070,-939.3102,42.1797) || PlayerToPoint(6.0,playerid,1944.3260,-1772.9254,13.3906))
- {//LS
- return 2000;
- }
- else if(PlayerToPoint(6.0,playerid,-90.5515,-1169.4578,2.4079) || PlayerToPoint(6.0,playerid,-1609.7958,-2718.2048,48.5391))
- {//LS
- return 2000;
- }
- else if(PlayerToPoint(6.0,playerid,-2029.4968,156.4366,28.9498) || PlayerToPoint(8.0,playerid,-2408.7590,976.0934,45.4175))
- {//SF
- return 2000;
- }
- else if(PlayerToPoint(5.0,playerid,-2243.9629,-2560.6477,31.8841) || PlayerToPoint(8.0,playerid,-1676.6323,414.0262,6.9484))
- {//Between LS and SF
- return 2000;
- }
- else if(PlayerToPoint(6.0,playerid,2202.2349,2474.3494,10.5258) || PlayerToPoint(10.0,playerid,614.9333,1689.7418,6.6968))
- {//LV
- return 2000;
- }
- else if(PlayerToPoint(8.0,playerid,-1328.8250,2677.2173,49.7665) || PlayerToPoint(6.0,playerid,70.3882,1218.6783,18.5165))
- {//LV
- return 2000;
- }
- else if(PlayerToPoint(8.0,playerid,2113.7390,920.1079,10.5255) || PlayerToPoint(6.0,playerid,-1327.7218,2678.8723,50.0625))
- {//LV
- return 2000;
- }
- }
- return 0;
- }
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" by YBob, make");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- main()
- {
- print("\n----------------------------------");
- print(" Only GF / by YBob, make");
- print("----------------------------------\n");
- }
- #endif
- public OnGameModeInit()
- {
- // Don't use these lines if it's a filterscript
- //SetGameModeText("Rob Script");
- //AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- //return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)
- {
- gbl_robber_status[playerid] = 0;
- GetCops();
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- gbl_robber_status[playerid] = 0;
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- gbl_robber_status[playerid] = 0;
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- gbl_robber_status[playerid] = 0;
- GetCops();
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- gbl_robber_status[playerid] = 0;
- if(amm_arr[playerid]>0){
- new string[256];
- GetCops();
- if(reason < 43){
- if(cops[killerid] == 1 && b_arr[playerid] == 1){
- GivePlayerMoney(playerid,(-1)*amm_arr[playerid]);
- GivePlayerMoney(killerid, floatround(amm_arr[playerid]/10, floatround_round));
- format(string, sizeof(string), "Du hast die gestohlenen %i$ zurueckerlangt und bekommst %i$ Belohnung!", amm_arr[playerid], floatround(amm_arr[playerid]/10, floatround_round));
- GameTextForPlayer(killerid,string,5000,3);
- SetAmm(4,amm_arr[playerid]-floatround(amm_arr[playerid]/10, floatround_round));
- }else if(cops[killerid] == 1 && b_arr[playerid] == 2){
- GivePlayerMoney(playerid,(-1)*amm_arr[playerid]);
- GivePlayerMoney(killerid, floatround(amm_arr[playerid]/10, floatround_round));
- format(string, sizeof(string), "Du hast die gestohlenen %i$ zurueckerlangt und bekommst %i$ Belohnung!", amm_arr[playerid], floatround(amm_arr[playerid]/10, floatround_round));
- GameTextForPlayer(killerid,string,5000,3);
- SetAmm(203,amm_arr[playerid]-floatround(amm_arr[playerid]/10, floatround_round));
- }else if(cops[killerid] == 1){
- GivePlayerMoney(playerid,(-1)*amm_arr[playerid]);
- GivePlayerMoney(killerid, floatround(amm_arr[playerid]/10, floatround_round));
- format(string, sizeof(string), "Du hast die gestohlenen %i$ zurueckerlangt und bekommst %i$ Belohnung!", amm_arr[playerid], floatround(amm_arr[playerid]/10, floatround_round));
- GameTextForPlayer(killerid,string,5000,3);
- }else{
- GivePlayerMoney(playerid,(-1)*amm_arr[playerid]);
- GivePlayerMoney(killerid, amm_arr[playerid]);
- format(string, sizeof(string), "Du hast %i$ erbaeutet!", amm_arr[playerid]);
- GameTextForPlayer(killerid,string,5000,3);
- }
- }else{
- GivePlayerMoney(playerid,(-1)*amm_arr[playerid]);
- }
- amm_arr[playerid] = 0;
- b_arr[playerid] = 0;
- ungueltig[playerid] = 1;
- }
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- return 1;
- }
- public OnPlayerPrivmsg(playerid, recieverid, text[])
- {
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/rob", cmdtext, true, 10) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(cops[playerid] == 1){
- GameTextForPlayer(playerid,"Du bist ein Cop!",5000,3);
- return 0;
- }
- for(new o=0; o<7200;o++){
- if(PlayerToPoint(10.0,playerid,gbl_LX[o],gbl_LY[o],gbl_LZ[o]) && gbl_L[o] == GetPlayerVirtualWorld(playerid)+1){
- GameTextForPlayer(playerid,"Dieser Laden wurde erst vor kurzem ausgeraubt!",5000,3);
- return 0;
- }
- }
- if(cops_on < 0)
- {
- GameTextForPlayer(playerid,"Es sind zu wenig cops online.",5000,3);
- return 0;
- }
- if(GetPlayerWeapon(playerid) < 21 || GetPlayerWeapon(playerid) > 39)
- {
- GameTextForPlayer(playerid,"Der Besitzer fuerchtet sich nicht!\nDu musst ihn mit deiner Waffe bedrohen!",5000,3);
- return 0;
- }
- if(gbl_robber_status[playerid] == 1)
- {
- GameTextForPlayer(playerid,"Du bist bereits am ausrauben!",5000,3);
- return 0;
- }
- new str_msg[256], name[256];
- GetPlayerName(playerid, name, sizeof(name));
- if(IsAtGasStation(playerid) >= 2000)
- {
- if(IsPlayerInAnyVehicle(playerid)){
- RemovePlayerFromVehicle(playerid);
- }
- ApplyAnimation(playerid,"SHOP", "ROB_Loop_Threat",4.0,1,0,0,0,0);
- format(str_msg, sizeof(str_msg), "Eine Tankstelle wird ausgeraubt!", name);
- gbl_robber_status[playerid] = 1;
- TogglePlayerControllable(playerid, 0);
- SetTimerEx("rob",60000,false,"i",playerid);
- ruf(str_msg, playerid);
- }
- else if(IsAtBar(playerid) >= 500)
- {
- ApplyAnimation(playerid,"SHOP", "ROB_Loop_Threat",4.0,1,0,0,0,0);
- if(PlayerToPoint(4.0,playerid,1215.9480,-13.3519,1000.9219)){
- format(str_msg, sizeof(str_msg), "Der PIG Pen wird ausgeraubt!", name);
- }else if(PlayerToPoint(4.0,playerid,495.7801,-76.0305,998.7578)){
- format(str_msg, sizeof(str_msg), "Eine Bar wird ausgeraubt!", name);
- }else if(PlayerToPoint(4.0,playerid,499.9654,-20.2515,1000.6797)){
- format(str_msg, sizeof(str_msg), "Eine Bar wird ausgeraubt!!", name);
- }else{
- format(str_msg, sizeof(str_msg), "Eine Bar wird ausgeraubt !", name);
- }
- gbl_robber_status[playerid] = 1;
- TogglePlayerControllable(playerid, 0);
- SetTimerEx("rob",30000,false,"i",playerid);
- ruf(str_msg, playerid);
- }
- else if(IsAtClothShop(playerid) >= 500)
- {
- ApplyAnimation(playerid,"SHOP", "ROB_Loop_Threat",4.0,1,0,0,0,0);
- format(str_msg, sizeof(str_msg), "Ein Geschaeft wird ausgeraubt!", name);
- gbl_robber_status[playerid] = 1;
- TogglePlayerControllable(playerid, 0);
- SetTimerEx("rob",30000,false,"i",playerid);
- ruf(str_msg, playerid);
- }
- else if(IsAtCash(playerid) >= 2000)
- {
- ApplyAnimation(playerid,"SHOP", "ROB_Loop_Threat",4.0,1,0,0,0,0);
- format(str_msg, sizeof(str_msg), "Ein Geld Automat wird ausgeraubt !", name);
- gbl_robber_status[playerid] = 1;
- TogglePlayerControllable(playerid, 0);
- SetTimerEx("rob",30000,false,"i",playerid);
- ruf(str_msg, playerid);
- }
- else if(IsAtBank(playerid) == 20000)
- {
- format(str_msg, sizeof(str_msg), "Eine Bank wird ausgeraubt!", name);
- gbl_robber_status[playerid] = 1;
- ApplyAnimation(playerid,"SHOP", "ROB_Loop_Threat",4.0,1,0,0,0,0);
- SetTimerEx("rob",120000,false,"i",playerid);
- ruf(str_msg, playerid);
- }else{
- GameTextForPlayer(playerid,"Du bist in keinem Laden!",5000,3);
- return 0;
- }
- return 1;
- }
- }
- return 0;
- }
- public OnPlayerInfoChange(playerid)
- {
- return 1;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- DisablePlayerCheckpoint(playerid);
- return 1;
- }
- public OnPlayerLeaveCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerEnterRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnRconCommand(cmd[])
- {
- return 1;
- }
- public OnObjectMoved(objectid)
- {
- return 1;
- }
- public OnPlayerObjectMoved(playerid, objectid)
- {
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- return 1;
- }
- public OnPlayerSelectedMenuRow(playerid, row)
- {
- return 1;
- }
- public OnPlayerExitedMenu(playerid)
- {
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement