23.02.2016, 19:32
Код:
if(strcmp(cmd, "/rb1", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pFaction] != 255 && FactionInfo[PlayerInfo[playerid][pFaction]][fType] == 1) { if (PlayerInfo[playerid][pRank] < 3) { SendClientMessage(playerid, COLOR_WHITE, "You have placed a Road Block, /rblock to Remove All Road Blocks."); new Float:X,Float:Y,Float:Z,Float:A; GetPlayerPos(playerid, X, Y, Z); GetPlayerFacingAngle(playerid,A); if(PlayerInfo[playerid][pFaction] == 1) { RoadBlocks++; RoadBlockObject[RoadBlocks] = CreateObject(981, X, Y, Z, 0, 0, A); } else { RoadBlocksFBI++; RoadBlockObjectFBI[RoadBlocksFBI] = CreateObject(981, X, Y, Z, 0, 0, A); } } else { SendClientMessage(playerid, COLOR_GREY, " You rank is to low to set a Road Block !"); return 1; } } } return 1; } if(strcmp(cmd, "/rb2", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pFaction] != 255 && FactionInfo[PlayerInfo[playerid][pFaction]][fType] == 1) { if (PlayerInfo[playerid][pRank] < 3) { SendClientMessage(playerid, COLOR_WHITE, "You have placed a Road Block, /rblock to Remove All Road Blocks."); new Float:X,Float:Y,Float:Z,Float:A; GetPlayerPos(playerid, X, Y, Z); GetPlayerFacingAngle(playerid,A); if(PlayerInfo[playerid][pFaction] == 1) { RoadBlocks++; RoadBlockObject[RoadBlocks] = CreateObject(973, X, Y, Z, 0, 0, A); } else { RoadBlocksFBI++; RoadBlockObjectFBI[RoadBlocksFBI] = CreateObject(973, X, Y, Z, 0, 0, A); } } else { SendClientMessage(playerid, COLOR_GREY, " You rank is to low to set a Road Block !"); return 1; } } } return 1; } if(strcmp(cmd, "/cone", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pFaction] != 255 && FactionInfo[PlayerInfo[playerid][pFaction]][fType] == 1) { if (PlayerInfo[playerid][pRank] < 3) { SendClientMessage(playerid, COLOR_WHITE, "You have placed a Road Block, /rblock to Remove All Road Blocks."); new Float:X,Float:Y,Float:Z,Float:A; GetPlayerPos(playerid, X, Y, Z); GetPlayerFacingAngle(playerid,A); if(PlayerInfo[playerid][pFaction] == 1) { RoadBlocks++; RoadBlockObject[RoadBlocks] = CreateObject(1238, X, Y, Z-0.7, 0, 0, A); } else { RoadBlocksFBI++; RoadBlockObjectFBI[RoadBlocksFBI] = CreateObject(1238, X, Y, Z-0.7, 0, 0, A); } } else { SendClientMessage(playerid, COLOR_GREY, " You rank is to low to set a Road Block !"); return 1; } } } return 1; }