pawn Код:
if(strcmp(cmd, "/legalizarme", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerToPoint(50, playerid, 362.0544,173.9798,1008.3828) || PlayerToPoint(50,playerid, 361.9957,173.8941,1008.3828) || PlayerToPoint(50,playerid,362.4526,173.7914,1008.3828) || PlayerToPoint(35,playerid,375.9876,169.8876,1008.3893) || PlayerToPoint(50,playerid,378.1173,176.7755,1008.3828) || PlayerToPoint(5,playerid,2643.1829,1216.4512,26.9233))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USA: /legalizarme [Item]");
SendClientMessage(playerid, COLOR_BLUE, "|_______ Departamento de Immigraciуn _______|");
SendClientMessage(playerid, COLOR_GRAD2, "| 1: Deseo obtener el permiso de residencia (500)$");
SendClientMessage(playerid, COLOR_GRAD2, "| 2: Deseo Entregar mi nacionalidad y Perderla(Gratis)");
SendClientMessage(playerid, COLOR_WHITE, "Funcionaria: Buenas tardes, ї en que puedo ayudarle?");
return 1;
}
new item = strval(tmp);
if (item == 1 && GetPlayerMoney(playerid) > 499)
{
if(PlayerInfo[playerid][pDNI] == 0)
{
PlayerInfo[playerid][pDNI] = 1;
SendClientMessage(playerid, COLOR_WHITE, "Felicidades! Has conseguido el permiso de residencia de este estado!");
GivePlayerMoney(playerid, -500);
new nif = 100000 + random(899999);
PlayerInfo[playerid][pNIF] = nif;
SBizzInfo[3][sbTill] += 1000;
}
else { SendClientMessage(playerid, COLOR_WHITE, "Ya tienes permiso de residencia!"); return 1; }
}
else if (item == 2)
{
if(PlayerInfo[playerid][pDNI] == 1)
{
PlayerInfo[playerid][pDNI] = 0;
SendClientMessage(playerid, COLOR_WHITE, "Perdiу su permiso de residencia en este estado.");
SendClientMessage(playerid, COLOR_WHITE, "Le proporcionamos 1 Ticket para salir de la ciudad, inmigrante ilegal!");
PlayerInfo[playerid][pTicket] = 1;
}
else { SendClientMessage(playerid, COLOR_WHITE, "Pero si nisiquiera tienes residencia, Sos immigrante ilegal!"); return 1; }
}
else
{ SendClientMessage(playerid, COLOR_WHITE, "No Cumples Los Requisitos o No Estбs En La Secretaria del Ayuntamiento!"); return 1; }
}
return 1;
}
}
if(strcmp(cmd, "/reportar", true) == 0)
{
if(NoReportar[playerid] == MAXIMOS_REPORTAR) return SendClientMessage(playerid,0x7EBEFFFF,"Espera 2 minutos para mandar un reporte nuevo.");
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid,COLOR_GRAD2, "Uso: /reportar [ID/Nombre] [Razуn]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid,COLOR_GRAD2, "Uso: /reportar [ID/Nombre] [Razуn]");
return 1;
}
format(string, sizeof(string), "Reportar: %s a [%d]:%s. Razon: %s", sendername, giveplayerid, giveplayer,(result));
ABroadCast(ESET32,string,1);
format(string, sizeof(string),"El reporte ha sido enviado a los adminitradores. .");
SendClientMessage(playerid, YELLOW, string);
}
}
}
return 1;
}
if(strcmp(cmd, "/bug", true) == 0)