23.04.2014, 20:15
esta estranho cara ta de boa la
quando eu uso /atribuir id quando mato o contrato ele fecha
quando eu uso /atribuir id quando mato o contrato ele fecha
PHP код:
if(ConnectedToPC[playerid] == 255)
{
new idx;
tmp = strtok(text, idx);
if ((strcmp("contratos", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("contratos")))
{
if(PlayerInfo[playerid][pCargo] < 4)
{
SendClientMessage(playerid, COLOR_GREY, " Somente Hitman com cargo 4 ou mais poderгo ver e atribuir contratos !");
return 0;
}
SearchingHit(playerid);
return 0;
}
else if ((strcmp("atribuir", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("atribuir")))
{
if(hitfound == 0)
{
SendClientMessage(playerid, COLOR_GREY, " Nгo hб contratos !");
return 0;
}
tmp = strtok(text, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USO: atribuir [playerid/Parte-do-Nick]");
return 0;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(PlayerInfo[giveplayerid][pMember] != 8)
{
SendClientMessage(playerid, COLOR_GREY, " Esse jogador nгo й um Assassino !");
return 0;
}
if(GoChase[giveplayerid] < 999)
{
SendClientMessage(playerid, COLOR_GREY, " Este Assassino jб estб ocupado com um Contrato !");
return 0;
}
if(IsPlayerConnected(hitid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giver, sizeof(giver));
GetPlayerName(hitid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "Vocк atribuiu %s a matar: %s(ID:%d), por R$ %d.", giver, giveplayer, hitid, PlayerInfo[hitid][pHeadValue]);
SendClientMessage(playerid, COLOR_YELLOW, string);
format(string, sizeof(string), "O assassino %s atriubuiu a vocк, matar: %s(ID:%d), por R$ %d.", sendername, giveplayer, hitid, PlayerInfo[hitid][pHeadValue]);
SendClientMessage(giveplayerid, COLOR_YELLOW, string);
//format(string, sizeof(string), "O assassino %s, atribuiu para o assassino %s para matar: %s(ID:%d), for R$ %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
{
SendClientMessage(playerid, COLOR_GREY, " A pessoa sob contrato estб Offline !");
return 0;
}
}
return 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Este assassino nгo estб online, atribua a outro !");
return 0;
}
}
else if ((strcmp("cargos", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("cargos")))
{
SendClientMessage(playerid, COLOR_WHITE, "|__________________ Hitman & Cargos __________________|");
for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pMember] == 8||PlayerInfo[i][pLeader] == 8)
{
GetPlayerName(i, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "%s: cargo %d", giveplayer,PlayerInfo[i][pCargo]);
SendClientMessage(playerid, COLOR_GREY, string);
}
}
}
}
else if ((strcmp("Logout", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Logout")))
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Vocк desligou seu Laptop, e desconectou da Agкncia.");
ConnectedToPC[playerid] = 0;
return 0;
}
else
{
new mtext[20];
getdate(year, month, day);
if(month == 1) { mtext = "Janeiro"; }
else if(month == 2) { mtext = "Fevereiro"; }
else if(month == 3) { mtext = "Marзo"; }
else if(month == 4) { mtext = "Abril"; }
else if(month == 5) { mtext = "Maio"; }
else if(month == 6) { mtext = "Junho"; }
else if(month == 7) { mtext = "Julho"; }
else if(month == 8) { mtext = "Agosto"; }
else if(month == 9) { mtext = "Setembro"; }
else if(month == 10) { mtext = "Outubro"; }
else if(month == 11) { mtext = "Novembro"; }
else if(month == 12) { mtext = "Dezembro"; }
new hour,minuite,second;
gettime(hour,minuite,second);
FixHour(hour);
hour = shifthour;
GetPlayerName(playerid, sendername, sizeof(sendername));
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Vocк abriu seu Laptop, e conectou а Agкncia.");
SendClientMessage(playerid, COLOR_WHITE, "|--Agкncia Assassinos--|");
SendClientMessage(playerid, COLOR_WHITE, "|-Noticias-|");
SendClientMessage(playerid, COLOR_WHITE, "|-Contratos-|");
SendClientMessage(playerid, COLOR_WHITE, "|-Atribuir-|");
SendClientMessage(playerid, COLOR_WHITE, "|-Cargos-|");
SendClientMessage(playerid, COLOR_WHITE, "|-Logout-|");
format(string, sizeof(string), "Mкs: %s | Dia: %d | Hora: %d:%d |", mtext, day, hour+1, minuite);
SendClientMessage(playerid, COLOR_WHITE, string);
return 0;
}
return 0;
}