- 0
Problema order/attack -> merge doar la Ballas/Grove la AzTECas si Vagos nu.
-
Similar Content
-
- 7 answers
- 482 views
-
- 0 replies
- 150 views
-
- 1 answer
- 233 views
-
- 3 answers
- 346 views
-
- 3 replies
- 398 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
ValyYellow
Buna ziua..am o problema si nu stiu cum sa o rezolv ...deci order si attack merge doar la grove/ballas si la aztecas si vagos nu ..uitati aici niste linii
CMD:order(playerid, params[]) { if(PlayerData[playerid][pGunLicense] >= 1) { if(IsGangster(playerid)) { new amount; if(sscanf(params, "d",amount)) { SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/order [item]"); SendClientMessage(playerid, COLOR_GREY, "Order 1: Deagle (Materiale: 300)"); SendClientMessage(playerid, COLOR_GREY, "Order 2: AK47 (Materiale: 400)"); SendClientMessage(playerid, COLOR_GREY, "Order 3: M4A1 (Materiale: 400)"); SendClientMessage(playerid, COLOR_GREY, "Order 4: MP5 (Materiale: 350)"); SendClientMessage(playerid, COLOR_GREY, "Order 5: Rifle (Materiale: 500)"); } else if(IsPlayerConnectedEx(playerid)) { if(groupVariables[PlayerData[playerid][pGroup]][gSafe][1] >= 5000) { if(GetPlayerCash(playerid) >= 2000) { if(IsPlayerInRangeOfPoint(playerid, 100.0, groupVariables[PlayerData[playerid][pGroup]][gGroupInteriorPos][0], groupVariables[PlayerData[playerid][pGroup]][gGroupInteriorPos][1], groupVariables[PlayerData[playerid][pGroup]][gGroupInteriorPos][2])) { if(amount == 1) { GivePlayerWeapon(playerid, 24, 150); PlayerData[playerid][pWeapons][0] = 24; GivePlayerCash(playerid,-1000,"cmd:order"); groupVariables[PlayerData[playerid][pGroup]][gSafe][1] -= 300; groupVariables[PlayerData[playerid][pGroup]][gSafe][0] += 1000; SCM(playerid, COLOR_WHITE,"Ai cumparat un Deagle cu 1.000$. 300 de materiale au fost retrase din seiful factiunii."); } else if(amount == 2) { GivePlayerWeapon(playerid, 30, 200); PlayerData[playerid][pWeapons][1] = 30; GivePlayerCash(playerid,-1250,"cmd:order"); groupVariables[PlayerData[playerid][pGroup]][gSafe][1] -= 400; groupVariables[PlayerData[playerid][pGroup]][gSafe][0] += 1250; SCM(playerid, COLOR_WHITE,"Ai cumparat un AK47 cu 1.250$. 400 de materiale au fost retrase din seiful factiunii."); } else if(amount == 3) { GivePlayerWeapon(playerid, 31, 200); PlayerData[playerid][pWeapons][2] = 31; GivePlayerCash(playerid,-1250,"cmd:order"); groupVariables[PlayerData[playerid][pGroup]][gSafe][1] -= 400; groupVariables[PlayerData[playerid][pGroup]][gSafe][0] += 1500; SCM(playerid, COLOR_WHITE,"Ai cumparat un M4A1 cu 1.500$. 400 de materiale au fost retrase din seiful factiunii."); } else if(amount == 4) { GivePlayerWeapon(playerid, 29, 90); PlayerData[playerid][pWeapons][3] = 29; GivePlayerCash(playerid,-1750,"cmd:order"); groupVariables[PlayerData[playerid][pGroup]][gSafe][1] -= 350; groupVariables[PlayerData[playerid][pGroup]][gSafe][0] += 1750; SCM(playerid, COLOR_WHITE,"Ai cumparat un MP5 cu 1.750$. 350 de materiale au fost retrase din seiful factiunii."); } else if(amount == 5) { GivePlayerWeapon(playerid, 33, 25); PlayerData[playerid][pWeapons][4] = 33; GivePlayerCash(playerid,-2000,"cmd:order"); groupVariables[PlayerData[playerid][pGroup]][gSafe][1] -= 500; groupVariables[PlayerData[playerid][pGroup]][gSafe][0] += 2000; SCM(playerid, COLOR_WHITE,"Ai cumparat un Riffle cu 2.000$. 500 de materiale au fost retrase din seiful factiunii."); } else { SCM(playerid,COLOR_WHITE,"Invalid order id."); } } } else return SCM(playerid, COLOR_WHITE, "Nu ai destui bani."); } else return SCM(playerid, COLOR_WHITE, "Nu poti cumpara arme deoarece factiunea ta nu are suficiente materiale."); } } if(PlayerData[playerid][pGroup] == 5) { if(IsPlayerInRangeOfPoint(playerid, 35.0, 773.8241,-49.5217,1000.5859)) { GivePlayerWeapon(playerid, 34, 9999); GivePlayerWeapon(playerid, 23, 9999); GivePlayerWeapon(playerid, 4, 9999); PlayerData[playerid][pWeapons][0] = 34; PlayerData[playerid][pWeapons][1] = 23; PlayerData[playerid][pWeapons][2] = 4; } } } else { SCM(playerid, COLOR_TEAL, "You don't have the gun license"); } return 1; } CMD:attack(playerid) return cmd_war(playerid); CMD:war(playerid) { if(!IsGangster(playerid)) return SCM(playerid,COLOR_ER,"You can't use this command."); if(PlayerData[playerid][pGroupRank] < 5) return SCM(playerid,COLOR_ER,"You can't use this command.(Rank 5+)"); if(groupVariables[PlayerData[playerid][pGroup]][gDelay] > 0) return SCM(playerid,COLOR_ER,"You can attack after %s minutes.", CalculeazaTimp(groupVariables[PlayerData[playerid][pGroup]][gDelay])); new turf; for(new i = 0; i < TotalTurfs; i++) if(IsPlayerInTurf(playerid, i) == 1) { turf = i; break; } if(!turf) return SCM(playerid,COLOR_ER,"You need to be in a turf."); if(TurfData[turf][turf_warid] != 0) return SCM(playerid,-1,"This turf is already under attack."); if(TurfData[turf][tOwned] == PlayerData[playerid][pGroup]) return SCM(playerid,-1,"You can't attack your own turf."); if(groupVariables[PlayerData[playerid][pGroup]][gInWar]) return SCM(playerid, COLOR_WHITE, "Your faction is already in a war!"); if(groupVariables[TurfData[turf][tOwned]][gInWar]) return SCM(playerid, COLOR_WHITE, "This faction is already in a war !"); TurfData[turf][turf_att] = PlayerData[playerid][pGroup]; TurfData[turf][turf_def] = TurfData[turf][tOwned]; TurfData[turf][turf_time] = 600; groupVariables[TurfData[turf][turf_att]][gScore] = 0; groupVariables[TurfData[turf][turf_att]][gInWar] = 1; groupVariables[TurfData[turf][turf_def]][gScore] = 0; groupVariables[TurfData[turf][turf_def]][gInWar] = 1; mysql_format(handle,result,sizeof(result),"INSERT INTO `log_wars` (`war_turf`, `war_attacker`, `war_defender`, `war_starttime`) VALUES(%d,%d,%d,%d)", TurfData[turf][tID], TurfData[turf][turf_att], TurfData[turf][turf_def], gettime()); new Cache: _war = mysql_query(handle, result); TurfData[turf][turf_warid] = cache_insert_id(); cache_delete(_war); szQueryOutput[0] = 0; format(szQueryOutput, sizeof(szQueryOutput),"[WAR]: {FFFFFF}Faction {%06x}%s{FFFFFF} declared a war ("BB"%s #%d{FFFFFF}) against {%06x}%s{FFFFFF}!", groupVariables[TurfData[turf][turf_att]][gColor] >>> 8, groupVariables[TurfData[turf][turf_att]][gGroupName], GetTurfName(turf), TurfData[turf][tID], groupVariables[TurfData[turf][turf_def]][gColor] >>> 8, groupVariables[TurfData[turf][turf_def]][gGroupName] ); SendClientMessageToAll(COLOR_BB,szQueryOutput); szSmallString[0] = 0; foreach(Player, i) { if(PlayerData[i][pGroup] == TurfData[turf][turf_att] || PlayerData[i][pGroup] == TurfData[turf][turf_def]) { format(szSmallString, sizeof(szSmallString), "War time: ~y~%s ~w~", CalculeazaTimp(TurfData[turf][turf_time])); TextDrawSetString(tTimer[i], szSmallString); TextDrawShowForPlayer(i, tTimer[i]); PlayerData[i][pWarScore] = 0; PlayerData[i][pWarDeaths] = 0; PlayerData[i][pWarCombo] = 0; GangZoneFlashForPlayer(i, TurfData[turf][tGameID], COLOR_FLASH); if(GetPlayerVirtualWorld(i) == 0) SetPlayerVirtualWorld(i, TurfData[turf][turf_warid]); mysql_format(handle,result,sizeof(result),"INSERT INTO `log_warplayers` (`war_warid`, `war_userid`, `war_group`) VALUES(%d,%d,%d)", TurfData[turf][turf_warid], PlayerData[i][pInternalID], PlayerData[i][pGroup]); mysql_tquery(handle, result); } } for(new x = 0; x < systemVariables[vehicleCounts][0]; x++) { if(vehicleVariables[x][vVehicleGroup] == TurfData[turf][turf_att] || vehicleVariables[x][vVehicleGroup] == TurfData[turf][turf_def]) { SetVehicleVirtualWorld(vehicleVariables[x][vVehicleScriptID],TurfData[turf][turf_warid]); } } return 1; }
Nu stiu cum sa rezolv..ajutati-ma va rog..mersi!
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.