- 0
[GF/RP] Problema givehit
-
Similar Content
-
- 2 answers
- 614 views
-
Problema turf
By Soryn.,
- 3 answers
- 402 views
-
- 0 replies
- 142 views
-
- 2 replies
- 331 views
-
- 1 reply
- 203 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
CoZmIn
Salut.
Am o mare problema la hitman.
Dau givehit la un membru hitman,cu o victima. Acel membru cand se duce sa isi omoare victima,nu primeste banii de la contract.
De la ce poate fii ? :|
[pawn]else if ((strcmp("Givehit", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Givehit")))
{
if(PlayerInfo[playerid][pRank] < 4)
{
SendClientMessage(playerid, COLOR_GREY, " Ai nevoie de Rank 4 ca sa dai contracte hitmanilor!");
return 0;
}
/*if(hitfound == 0)
{
SendClientMessage(playerid, COLOR_GREY, " There is no Hit Founded yet, use Contracts in the Portable first !");
return 0;
}*/
tmp = strtok(text, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USAGE: Givehit [playerid/PartOfName][tinta id]");
return 0;
}
//giveplayerid = strvalEx(tmp);
giveplayerid = ReturnUser(tmp);
tmp = strtok(text, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USAGE: Givehit [playerid/PartOfName][tinta id]");
return 0;
}
new i = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if((giveplayerid != INVALID_PLAYER_ID) && (i != INVALID_PLAYER_ID))
{
if(PlayerInfo[giveplayerid][pMember] != 8 && PlayerInfo[giveplayerid][pLeader] != 8)
{
SendClientMessage(playerid, COLOR_GREY, " Acel jucator nu este membru Hitman!");
return 0;
}
if(GoChase[giveplayerid] < 999)
{
SendClientMessage(playerid, COLOR_GREY, " That Hitman is already busy with a Contract !");
return 0;
}
if(IsPlayerConnected(i))
{
if(hitid == 1)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giver, sizeof(giver));
GetPlayerName(i, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* Ai alocat %s sa il omoare pe: %s(ID:%d).", giver, giveplayer, i);
SendClientMessage(playerid, COLOR_YELLOW, string);
format(string, sizeof(string), "* Hitman %s a alocat sa il omoare pe: %s(ID:%d).", sendername, giveplayer, i);
SendClientMessage(giveplayerid, COLOR_YELLOW, string);
format(string, sizeof(string), "* Hitman %s,a alocat pe %s sa omoare pe: %s(ID:%d), pentru $%d.", sendername, giver, giveplayer, i, PlayerInfo[pHeadValue]);
SendFamilyMessage(8, COLOR_YELLOW, string);
GoChase[giveplayerid] = i;
GetChased = giveplayerid;
GotHit = 1;
hitid = 0;
return 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Persoana contractata nu are o miza pe capul ei!");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Persoana contractata nu este conectat, Contracte utilizarea în portabil din nou!");
return 0;
}
}
return 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Acel hitman nu este online, sau nu e hitman!");
return 0;
}
}[/pawn]
[pawn]public SearchingHit(playerid)
{
new string[256];
new giveplayer[MAX_PLAYER_NAME];
new searchhit = 0;
SendClientMessage(playerid, COLOR_WHITE, "|__________________ Hitman Agency News __________________|");
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[pHeadValue] > 0 && GotHit == 0 && PlayerInfo[pMember] != 8 && PlayerInfo[pLeader] != 8)
{
GetPlayerName(i, giveplayer, sizeof(giveplayer));
searchhit += 1;
//hitfound = 1;
hitid = 1;
if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8)
{
format(string, sizeof(string), "Person: %s ID: %d Value: $%d", giveplayer, i, PlayerInfo[pHeadValue]);
SendClientMessage(playerid, COLOR_OOC, string);
}
}
}
}
if(searchhit == 0)
{
if(PlayerInfo[playerid][pLimba] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "Nu sunt contracte disponibile, momentan !");
}
else
{
SendClientMessage(playerid, COLOR_GREY, "No Contracts available !");
}
}
else
{
if(PlayerInfo[playerid][pLimba] == 0)
{
format(string, sizeof(string), "%d contracte disponibile.", searchhit);
}
else
{
format(string, sizeof(string), "%d contracts avaible.", searchhit);
}
SendClientMessage(playerid, COLOR_WHITE, string);
}
return 0;
}[/pawn]
[pawn]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));
//GivePlayerCash(killerid, PlayerInfo[playerid][pHeadValue]);
GivePlayerCash(killerid, PlayerInfo[playerid][pHeadValue]);
format(string,128,"<< Hitman %s l-a omorat pe %s si a primit $%d >>",killer,name,PlayerInfo[playerid][pHeadValue]);
SendFamilyMessage(8, COLOR_YELLOW, string);
PlayerInfo[playerid][pHeadValue] = 0;
GotHit[playerid] = 0;
GetChased[playerid] = 999;
GoChase[killerid] = 999;
Disguise[killerid] = 0;
}
}
}
}[/pawn]
Multumesc frumos,astept cat mai repede un raspuns .
www.play-gaming.ro/forum
Link to comment
Share on other sites
7 answers to this question
Recommended Posts