Код:
if(strcmp(cmd,"/darcontrato",true)==0)
{
if(PlayerInfo[playerid][pRank] < 3)
{
SendClientMessage(playerid, COLOR_GREY, " Nesesitas Rango 3 para ver los contratos Murderers !");
return 0;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(PlayerInfo[giveplayerid][pMember] == 31 || PlayerInfo[giveplayerid][pLeader] == 31)
{
if(GoChase[giveplayerid] < 999)
{
SendClientMessage(playerid, COLOR_GREY, " Ya estбs ocupado en otra mision !");
return 0;
}
if(IsPlayerConnected(hitid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(hitid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* Murderers: %s, Asigno al Hitman %s a Exterminar a: %s(ID:%d), Por $%d.", sendername, 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, " La persona contratada no estб en lнnea, utilice los contratos en el nuevo portбtil !");
return 0;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Ese jugador no es un asesino a sueldo !");
return 0;
}
}
return 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " No estб conectado o no es un Murderers!");
return 0;
}
}
Код:
if(strcmp(cmd,"/contratos",true)==0)
{
if(PlayerInfo[playerid][pRank] < 3)
{
SendClientMessage(playerid, COLOR_GREY, "Solo los Murderers con rango 4 Pueden asignar y buscar Contratos !");
return 0;
}
SearchingHit(playerid);
return 0;
}
Код:
if(strcmp(cmd, "/contrato", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "[INFO]: /contrato [JugadorId/ParteDelNombre] [Cantidad]");
return 1;
}
giveplayerid = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "[INFO]: /contrato [JugadorId/ParteDelNombre] [Cantidad]");
return 1;
}
moneys = strval(tmp);
if(moneys < 1000 || moneys > 20000) { SendClientMessage(playerid, COLOR_GREY, " Mнnimo $1000, mбximo $20000!"); return 1; }
if(PlayerInfo[playerid][pLevel] < 1)
{
SendClientMessage(playerid, COLOR_GRAD1, "Usted debe ser el nivel 3 para colocar un contrato.");
return 1;
}
if (IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(PlayerInfo[giveplayerid][pMember] == 31 && PlayerInfo[playerid][pMember] == 31)
{
SendClientMessage(playerid, COLOR_GREY, " No se puede colocar en los contratos de su propia agencia!");
return 1;
}
else if(PlayerInfo[giveplayerid][pLeader] == 31 && PlayerInfo[playerid][pMember] == 31)
{
SendClientMessage(playerid, COLOR_GREY, " No se puede colocar en los contratos de su propia agencia!");
return 1;
}
else if(PlayerInfo[giveplayerid][pMember] == 31 || PlayerInfo[giveplayerid][pLeader] == 31)
{
SendClientMessage(playerid, COLOR_GREY, " No se puede hacer un contrato a un Murderers !");
return 1;
}
if(gTeam[giveplayerid] == 2 && moneys != 2000)
{
SendClientMessage(playerid, COLOR_GREY, " Policнas mнnimo 2.000 Dуlares !");
return 1;
}
if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "No te puedes contrato!"); 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), "Has puesto un contrato a %s por $%d.",sendername, giveplayer, moneys);
SendFamilyMessage(8, COLOR_YELLOW, string);
format(string, sizeof(string), "Has puesto un contrato a %s por $%d.",giveplayer, moneys);
SendClientMessage(playerid, COLOR_WHITE, string);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Monto de transaccion invalida.");
}
}
}
else
{
format(string, sizeof(string), " %d no es un player activo.", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}