- 0
Bug Hitman
-
Similar Content
-
- 7 replies
- 638 views
-
- 10 answers
- 3.225 views
-
- 3 answers
- 896 views
-
- 16 answers
- 2.630 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.

Question
Papana
Se pare ca postul meu a fost sters :| :| :| :|
Va rog nu il mai stergeti pe acesta.
Am si io un bug la hitman agency
Am contract pus pe cineva
i-l omor dar numi da bani sau sa scrie ca lam omorat.
Va rog sunt disperat sa-l rezolv
Am facut la pHeadvalue
am si pMember si pLeader
de unde se paote sa provina bugul
Sa va pun cateva care au parte cu phead si din hitman :|
if(PlayerInfo[playerid][pHeadValue] > 0) { if(IsPlayerConnected(killerid)) { if(gTeam[killerid] == 10 || PlayerInfo[killerid][pLeader] == 8 || PlayerInfo[killerid][pMember] == 8) { if(GoChase[killerid] == playerid) { //ConsumingMoney[killerid] = 1; new killer[MAX_PLAYER_NAME]; GetPlayerName(killerid, killer, sizeof(killer)); GivePlayerMoney(killerid, PlayerInfo[playerid][pHeadValue]); format(string,128,"<< Hitman %s has fulfilled the contract on %s and collected $%d >>",killer,name,PlayerInfo[playerid][pHeadValue]); SendFamilyMessage(8, COLOR_YELLOW, string); PlayerInfo[playerid][pHeadValue] = 0; GotHit[playerid] = 0; GetChased[playerid] = 999; GoChase[killerid] = 999; } } } }public SearchingHit(playerid) { new string[128]; new giveplayer[MAX_PLAYER_NAME]; new searchhit = 0; for(new i=0; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(searchhit == 0) { if(PlayerInfo[i][pHeadValue] > 0 && GotHit[i] == 0 && PlayerInfo[i][pMember] != 8) { GetPlayerName(i, giveplayer, sizeof(giveplayer)); searchhit = 1; hitfound = 1; hitid = i; for(new k=0; k<MAX_PLAYERS; k++) { if(IsPlayerConnected(k)) { if(PlayerInfo[k][pMember] == 8 || PlayerInfo[k][pLeader] == 8) { SendClientMessage(k, COLOR_WHITE, "|__________________ Hitman Agency News __________________|"); SendClientMessage(k, COLOR_DBLUE, "*** Incoming Message: A Hit has become available. ***"); format(string, sizeof(string), "Person: %s ID: %d Value: $%d", giveplayer, i, PlayerInfo[i][pHeadValue]); SendClientMessage(k, COLOR_DBLUE, string); SendClientMessage(k, COLOR_YELLOW, "Use Givehit hitmanid, to assign the Contract to one of the Hitmans."); SendClientMessage(k, COLOR_WHITE, "|________________________________________________________|"); } } } return 0; } } } } if(searchhit == 0) { SendClientMessage(playerid, COLOR_GREY, " No Contracts available !"); } return 0; } //=else if ((strcmp("Givehit", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Givehit"))) { if(PlayerInfo[playerid][pRank] < 4) { SCM(playerid, COLOR_GREY, " You need Rank 4 to Give Contracts to Hitmans !"); return 0; } if(hitfound == 0) { SCM(playerid, COLOR_GREY, " There is no Hit Founded yet, use Contracts in the Portable first !"); return 0; } tmp = strtok(text, idx); if(!strlen(tmp)) { SCM(playerid, COLOR_GRAD1, "USAGE: Givehit [playerid/PartOfName]"); return 0; } giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if(PlayerInfo[giveplayerid][pMember] != 8) if(PlayerInfo[giveplayerid][pLeader] != 8) { SCM(playerid, COLOR_GREY, " That player is not a Hitman !"); return 0; } if(GoChase[giveplayerid] < 999) { SCM(playerid, COLOR_GREY, " That Hitman is already busy with a Contract !"); return 0; } if(IsPlayerConnected(hitid)) { GetPlayerName(playerid, sendername, sizeof(sendername)); GetPlayerName(giveplayerid, giver, sizeof(giver)); GetPlayerName(hitid, giveplayer, sizeof(giveplayer)); format(string, sizeof(string), "* Hitman %s, assigned Hitman %s to kill: %s(ID:%d), for $%d.", sendername, giver, giveplayer, hitid, PlayerInfo[hitid][pHeadValue]); SendFamilyMessage(8, COLOR_YELLOW, string); GoChase[giveplayerid] = hitid; GetChased[hitid] = giveplayerid; GotHit[hitid] = 1; hitid = 0; hitfound = 0; return 0; } else { SCM(playerid, COLOR_GREY, " The Contracted Person is offline, use Contracts in the Portable again !"); return 0; } } return 0; } else { SCM(playerid, COLOR_GREY, " That Hitman is not Online, or ain't a Hitman !"); return 0; } }if(strcmp(cmd, "/contract", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /contract [playerid/PartOfName] [amount]"); return 1; } giveplayerid = ReturnUser(tmp); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /contract [playerid/PartOfName] [amount]"); return 1; } moneys = strval(tmp); if(moneys < 1000 || moneys > 100000) { SendClientMessage(playerid, COLOR_GREY, " Contract money must be atleast $1000, and not more then $100000!"); return 1; } if(PlayerInfo[playerid][pLevel] < 3) { SendClientMessage(playerid, COLOR_GRAD1, "You must be level 3 to place a Contract."); return 1; } if (IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if(PlayerInfo[giveplayerid][pMember] == 8 && PlayerInfo[playerid][pMember] == 8) { SendClientMessage(playerid, COLOR_GREY, " Cannot place Contracts on your own Agency!"); return 1; } else if(PlayerInfo[giveplayerid][pLeader] == 8 && PlayerInfo[playerid][pMember] == 8) { SendClientMessage(playerid, COLOR_GREY, " Cannot place Contracts on your own Agency!"); return 1; } else if(PlayerInfo[giveplayerid][pMember] == 8||PlayerInfo[giveplayerid][pLeader] == 8) { SendClientMessage(playerid, COLOR_GREY, " Can't contract a Hitman !"); return 1; } if(gTeam[giveplayerid] == 2 && moneys != 100000) { SendClientMessage(playerid, COLOR_GREY, " Only $100000 can be placed as a Contract on Cops !"); return 1; } if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot Contract yourself!"); return 1; } GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); playermoney = GetPlayerMoney(playerid); if (moneys > 0 && playermoney >= moneys) { GivePlayerMoney(playerid, (0 - moneys)); PlayerInfo[giveplayerid][pHeadValue]+=moneys; format(string, sizeof(string), "%s has placed a contract on %s, for $%d.",sendername, giveplayer, moneys); SendFamilyMessage(8, COLOR_YELLOW, string); format(string, sizeof(string), "* You placed a contract on %s, for $%d.",giveplayer, moneys); SendClientMessage(playerid, COLOR_WHITE, string); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); } else { SendClientMessage(playerid, COLOR_GRAD1, " Invalid transaction amount."); } } } else { format(string, sizeof(string), " %d is not an active player.", giveplayerid); SendClientMessage(playerid, COLOR_GRAD1, string); } } return 1; }3 answers to this question
Recommended Posts