20.09.2012, 20:09
Olб tou com um gm aqui e algums comando nгo funciona
tipow,cops vao criar uma barreira ou pregos ou bloqueio ate ai funciona,mais quando vou retira-los ele nao funciona na verdade a mensagem funciona fala que retirei,mas os objetos nao se destrui-se ele ficгo no mesmo lugar!
mim ajudem!!vlw
tipow,cops vao criar uma barreira ou pregos ou bloqueio ate ai funciona,mais quando vou retira-los ele nao funciona na verdade a mensagem funciona fala que retirei,mas os objetos nao se destrui-se ele ficгo no mesmo lugar!
Код:
if(strcmp(cmdtext, "/barreira", true)==0 || strcmp(cmdtext, "/br", true)==0) { if (!IsACop(playerid)) return MSGPLAYER(playerid, COLOR_GREY, "Vocк nгo й um Policial!"); if(PlayerPaintballing[playerid] != 0) { MSGPLAYER(playerid,COLOR_YELLOW," Vocк nгo pode por barreiras no evento!"); return 1; } if (pRoadblock[playerid] != 0) return MSGPLAYER(playerid, COLOR_GREY, "Vocк sу pode criar 1 barreira por vez, /rbr - para remover sua barreira"); new Float:X, Float:Y, Float:Z, Float:A; GetPlayerPos(playerid, X, Y, Z); GetPlayerFacingAngle(playerid, A); pRoadblock[playerid] = F_CreateObject(981, X, Y, Z, 0.0, 0.0, A+180, 300.0); SetPlayerPos(playerid, X, Y, Z+4); GameTextForPlayer(playerid, "~w~Barreira ~r~Criada", 5000, 5); MSGPLAYER(playerid, COLOR_GREEN, "Barreira Implantada... Use /rbr Para Remove-la!"); format(string, sizeof(string), "Estado: Uma barreira foi posta por %s.", PlayerName(playerid)); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(IsACop(i)) { MSGPLAYER(i, TEAM_BLUE_COLOR, string); if (PlayerInfo[i][pCargo] >= 5 || PlayerInfo[i][pLider] > 0) { MSGPLAYER(i, TEAM_BLUE_COLOR, "Vocк pode remover todas as barreiras usando /rbrall"); } } } } return 1; } if(strcmp(cmdtext, "/removerbarreira", true)==0 || strcmp(cmdtext, "/rbr", true)==0) { if (!IsACop(playerid)) return MSGPLAYER(playerid, COLOR_GREY, "Vocк nгo й um Policial!"); if (pRoadblock[playerid] != 0) { RemoveRoadblock(playerid); MSGPLAYER(playerid, COLOR_GREY, "Vocк retirou a sua barreira!"); } else { return MSGPLAYER(playerid, COLOR_GREY, "Vocк nгo criou uma barreira!"); } format(string, sizeof(string), "Estado: Uma barreira foi destruнda por %s.", PlayerName(playerid)); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(IsACop(i)) { MSGPLAYER(i, TEAM_BLUE_COLOR, string); } } } return 1; } if(strcmp(cmdtext, "/removertodasbarreiras", true)==0 || strcmp(cmdtext, "/rbrall", true)==0) { if (PlayerInfo[playerid][pCargo] >= 4 && IsACop(playerid)) { for(new i = 0; i < MAX_PLAYERS; i++) { if(pRoadblock[i] != 0) { RemoveRoadblock(i); } } format(string, sizeof(string), "Estado: Todas as barreiras foram retiradas por: %s.", PlayerName(playerid)); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(IsACop(i)) { MSGPLAYER(i, TEAM_BLUE_COLOR, string); } } } } else { MSGPLAYER(playerid, COLOR_GREY, "Vocк precisa ser cargo 4+ ou um lнder de alguma organizaзгo policial para remover todas as barreiras!"); } return 1; } if(strcmp(cmdtext, "/removerprego", true)==0 || strcmp(cmdtext, "/rpr", true)==0) { if (!IsACop(playerid)) return MSGPLAYER(playerid, COLOR_GREY, "Vocк nгo й um Policial!"); if (SpikeInfo[playerid][sCreated] == 0) { MSGPLAYER(playerid, COLOR_GREY, "Vocк nгo criou nenhum tapete de pregos!"); return 1; } RemoveRoadPregos(playerid); MSGPLAYER(playerid, COLOR_GREY, "Vocк retirou seu tapete de pregos!"); format(string, sizeof(string), "Estado: %s removeu seu tapete de pregos.", PlayerName(playerid)); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(IsACop(i)) { MSGPLAYER(i, TEAM_BLUE_COLOR, string); } } } return 1; } if(strcmp(cmdtext, "/removerprall", true)==0 || strcmp(cmdtext, "/rprall", true)==0) { if (PlayerInfo[playerid][pCargo] >= 4 && IsACop(playerid)) { for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(SpikeInfo[playerid][sCreated] != 0) { RemoveRoadPregos(i); } } } format(string, sizeof(string), "Estado: Todos os pregos foram retirados por: %s.", PlayerName(playerid)); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if (IsACop(i)) { MSGPLAYER(i, TEAM_BLUE_COLOR, string); } } } } else { MSGPLAYER(playerid, COLOR_GREY, "Vocк precisa ser cargo 4+ ou um lнder de alguma organizaзгo policial para remover todos os tapetes de pregos!"); } return 1; } if(strcmp(cmdtext, "/prego", true)==0 || strcmp(cmdtext, "/pregos", true)==0) { if(PlayerPaintballing[playerid] != 0) { MSGPLAYER(playerid,COLOR_YELLOW," Vocк nгo pode por pregos no evento!"); return 1; } if (!IsACop(playerid)) return MSGPLAYER(playerid, COLOR_GREY, "Vocк nгo й COP!"); if (SpikeInfo[playerid][sCreated] != 0) return MSGPLAYER(playerid, COLOR_GREY, "Vocк sу pode implantar 1 prego por vez, /rpr - para remover seu tapete de pregos."); new Float:X, Float:Y, Float:Z, Float:A; GetPlayerPos(playerid, X, Y, Z); GetPlayerFacingAngle(playerid, A); SpikeInfo[playerid][sCreated]=1; SpikeInfo[playerid][sX]=X; SpikeInfo[playerid][sY]=Y; SpikeInfo[playerid][sZ]=Z-0.7; SpikeInfo[playerid][sObject] = F_CreateObject(2899, X, Y, Z-0.9, 0, 0, A-90, 300.0); GameTextForPlayer(playerid, "~w~Pregos ~r~Criados", 5000, 5); MSGPLAYER(playerid, COLOR_GREEN, "Pregos Implantados... Use /rpr Para Remover e Poder Criar Mais!."); format(string, sizeof(string), "Estado: Um prego foi bem plantado por %s.", PlayerName(playerid)); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(IsACop(i)) { MSGPLAYER(i, TEAM_BLUE_COLOR, string); if (PlayerInfo[i][pCargo] >= 5 && IsACop(i)) { MSGPLAYER(i, COLOR_YELLOW, "Vocк pode remover todos os pregos usando /rprall"); } } } } return 1; } if(strcmp(cmdtext, "/bloqueio", true)==0 || strcmp(cmdtext, "/bq", true)==0) { if(PlayerPaintballing[playerid] != 0) { MSGPLAYER(playerid,COLOR_YELLOW," Vocк nгo pode por bloqueios no evento!"); return 1; } if (!IsACop(playerid)) return MSGPLAYER(playerid, COLOR_GREY, "Vocк nгo й um policial!"); if (pRoadCones[playerid] != 0) return MSGPLAYER(playerid, COLOR_GREY, "Vocк sу pode implantar 1 Bloqueio por vez, /rbq - para remover seu bloqueio."); new Float:X, Float:Y, Float:Z, Float:A; GetPlayerPos(playerid, X, Y, Z); GetPlayerFacingAngle(playerid, A); pRoadCones[playerid] = F_CreateObject(4526, X, Y, Z+1, 0.0, 0.0, A+110, 300.0); SetPlayerPos(playerid, X, Y, Z+1); GameTextForPlayer(playerid, "~w~Bloqueio ~r~Criado", 5000, 5); MSGPLAYER(playerid, COLOR_GREEN, "Bloqueio Implantado... Use /rbq Para Remover e Poder Criar Mais!."); format(string, sizeof(string), "Estado: Um Bloqueio foi posto por %s.", PlayerName(playerid)); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(IsACop(i)) { MSGPLAYER(i, TEAM_BLUE_COLOR, string); if (PlayerInfo[i][pCargo] >= 5 && IsACop(i)) { MSGPLAYER(i, COLOR_YELLOW, "Vocк pode remover todos os Bloqueios usando /rbqall"); } } } } return 1; } if(strcmp(cmdtext, "/removerbloqueio", true)==0 || strcmp(cmdtext, "/rbq", true)==0) { if (!IsACop(playerid)) { MSGPLAYER(playerid, COLOR_GREY, "Vocк nгo й um policial!"); return 1; } if (pRoadCones[playerid] == 0) { MSGPLAYER(playerid, COLOR_GREY, "Vocк nгo criou nenhum bloqueio Bloqueio!"); return 1; } MSGPLAYER(playerid, COLOR_GREY, "Vocк retirou o seu Bloqueio!"); RemoveRoadCones(playerid); format(string, sizeof(string), "Estado: %s removeu seu bloqueio.", PlayerName(playerid)); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(IsACop(i)) { MSGPLAYER(i, TEAM_BLUE_COLOR, string); } } } return 1; } if(strcmp(cmdtext, "/removerbloqueioall", true)==0 || strcmp(cmdtext, "/rbqall", true)==0) { if (IsACop(playerid)) { for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(pRoadCones[i] != 0) { RemoveRoadCones(i); } } } format(string, sizeof(string), "Estado: Todos os Bloqueios foram retirados por: %s.", PlayerName(playerid)); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(IsACop(i)) { MSGPLAYER(i, TEAM_BLUE_COLOR, string); } } } } else { MSGPLAYER(playerid, COLOR_GREY, "Vocк precisa ser cargo 4+ ou ser um lнder da polнcia para remover todos os Bloqueios!"); } return 1; }