20.08.2010, 13:27
Код:
if(strcmp(cmd, "/elhelyez", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerToPoint(3.0,playerid,1242.9781,2829.0215,325.0854)) { if(PlayerInfo[playerid][pRobBomb] != 1) { SendClientMessage(playerid, COLOR_GREY, " Nincs bombбd"); return 1; } if(PlayerInfo[playerid][pBombaElhelyez] == 0) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "Elhelyezted a bombбt!"); PlayerInfo[playerid][pBombaElhelyez] = 1; OnPlayerUpdate(playerid); ApplyAnimation(playerid,"BOMBER","BOM_PLANT_LOOP",4.0,1,0,0,0,-1); PlayerInfo[playerid][pRobBomb] = 0; format(string, sizeof(string), "* Valaki elhelyezi a bombбt a szйfen!"); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); } } }
Код:
if(!strcmp(cmdtext, "/robbant", true)) { if(PlayerInfo[playerid][pBombaElhelyez] == 0) { SendClientMessage(playerid, COLOR_YELLOW2, " Nincs elhelyezve a bomba! (/elhelyez az ajtу elй)"); return 1; } if (PlayerToPoint(3, playerid,1246.8752,2813.3899,325.0763)) { SendRadioMessage(1, COLOR_DBLUE, "<<<FIGYELEM MINDEN EGYSЙGNEK>>>"); SendRadioMessage(1, COLOR_YELLOW2, "||Bankrablбs van kйszьlőben! Berobbantottбk a szйfet!||"); SendRadioMessage(2, COLOR_DBLUE, "<<<FIGYELEM MINDEN EGYSЙGNEK>>>"); SendRadioMessage(2, COLOR_YELLOW2, "||Bankrablбs van kйszьlőben! Berobbantottбk a szйfet!||"); SendRadioMessage(3, COLOR_DBLUE, "<<<FIGYELEM MINDEN EGYSЙGNEK>>>"); SendRadioMessage(3, COLOR_YELLOW2, "||Bankrablбs van kйszьlőben! Berobbantottбk a szйfet!||"); MoveObject(bankrob2,1246.835205, 2832.065674, 324.845856, 100); CreateExplosion(1246.835205, 2832.065674, 324.845856,2,5); SetTimer("BankRablas2", 120000, 0); PlayerInfo[playerid][pBombaElhelyez] = 0; format(string, sizeof(string), "* Valaki elhelyezi a bombбt a szйfen!"); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); ApplyAnimation(playerid,"BOMBER","BOM_PLANT_LOOP",4.0,1,0,0,0,-1); } return 1;