if(strcmp(cmd, "/rrb", 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, "All Road Blocks destroyed.."); for(new o = 0; o < MAX_OBJECTS; o++) { if (PlayerInfo[playerid][pRank] < 3) { DestroyObject(RoadBlockObject[o]); RoadBlocks = 0; } else { DestroyObject(RoadBlockObjectFBI[o]); RoadBlocksFBI = 0; } } } else { SendClientMessage(playerid, COLOR_GREY, " You rank is to low to set a Road Block !"); return 1; } } } return 1; }
if(strcmp(cmd, "/rrb", true) == 0)
{
if(!IsPlayerConnected(playerid)) return 0;
if(PlayerInfo[playerid][pRank] < 3)
{
if(PlayerInfo[playerid][pFaction] != 255 && FactionInfo[PlayerInfo[playerid][pFaction]][fType] == 1)
{
for(new o = 0; o < MAX_OBJECTS; o++)
{
DestroyObject(RoadBlockObject[o]);
RoadBlocks = 0;
}
SendClientMessage(playerid, COLOR_WHITE, "All Road Blocks destroyed..");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Your rank is too low to set a Road Block!");
}
return 1;
}
if(!IsPlayerConnected(playerid)) return 0;
if(PlayerInfo[playerid][pRank] < 3)
if(PlayerInfo[playerid][pRank] >= 3)
SendClientMessage(playerid, COLOR_GREY, "Your rank is too low to set a Road Block!");
if(strcmp(cmd, "/rrb", true) == 0)
{
if(PlayerInfo[playerid][pRank] < 3) return SendClientMessage(playerid, COLOR_GREY, "Your rank is too low to set a Road Block!");
if(PlayerInfo[playerid][pFaction] != 255 && FactionInfo[PlayerInfo[playerid][pFaction]][fType] == 1)
{
for(new o = 0; o < MAX_OBJECTS; o++)
{
DestroyObject(RoadBlockObject[o]);
RoadBlocks = 0;
}
SendClientMessage(playerid, COLOR_WHITE, "All Road Blocks destroyed..");
}
return 1;
}
PHP код:
PHP код:
PHP код:
|
if(strcmp(cmd, "/rrb", true) == 0) { if(PlayerInfo[playerid][pRank] > 3) return SendClientMessage(playerid, COLOR_GREY, "Your rank is too low to destroy a Road Block!"); if(PlayerInfo[playerid][pFaction] != 255 && FactionInfo[PlayerInfo[playerid][pFaction]][fType] == 1) { for(new o = 0; o < MAX_OBJECTS; o++) { DestroyObject(RoadBlockObject[o]); RoadBlocks = 0; } SendClientMessage(playerid, COLOR_WHITE, "All Road Blocks destroyed.."); } return 1; }
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; }