Buenas necesito que me pongais esto en el comando porfavor.
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USA : /factura [playerid/PartOfName] [price] ");
return 1;
}
giveplayerid = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USA : /factura [playerid/PartOfName] [price] [reason]");
return 1;
}
moneys = strval(tmp);
if(moneys < 1 || moneys > 99999) { SendClientMessage(playerid, COLOR_GREY, " El precio de la factura no puede ser Menor a 1 o mayor a 99999 !"); return 1; }
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if (ProxDetectorS(8.0, playerid, giveplayerid))
{
if(GetPlayerMoney(giveplayerid) < moneys)
{
SendClientMessage(playerid, COLOR_GRAD2, "Este jugador no tiene dinero suficiente!");
return 1;
}
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* Ha facturado a %s con un precio de $%d", giveplayer, moneys);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "* La factura de %s es de %d$", sendername, moneys);
SendClientMessage(giveplayerid, COLOR_WHITE, string);
SendClientMessage(giveplayerid, COLOR_WHITE, "* Escriba /aceptar factura, para pagar la multa.");
TicketOffer[giveplayerid] = playerid;
TicketMoney[giveplayerid] = moneys;
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " That player is not near you !");
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " That player is Offline !");
return 1;
}
}
}
return 1;
}[/pawn]
- Spoiler:
- if(PlayerToPoint(7.0, playerid,1774.5309,-1786.4642,13.5741) || PlayerToPoint(7.0, playerid,1772.5164,-1787.0770,13.5741))
{
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USA : /factura [playerid/PartOfName] [price] ");
return 1;
}
giveplayerid = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USA : /factura [playerid/PartOfName] [price] [reason]");
return 1;
}
moneys = strval(tmp);
if(moneys < 1 || moneys > 99999) { SendClientMessage(playerid, COLOR_GREY, " El precio de la factura no puede ser Menor a 1 o mayor a 99999 !"); return 1; }
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if (ProxDetectorS(8.0, playerid, giveplayerid))
{
if(GetPlayerMoney(giveplayerid) < moneys)
{
SendClientMessage(playerid, COLOR_GRAD2, "Este jugador no tiene dinero suficiente!");
return 1;
}
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* Ha facturado a %s con un precio de $%d", giveplayer, moneys);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "* La factura de %s es de %d$", sendername, moneys);
SendClientMessage(giveplayerid, COLOR_WHITE, string);
SendClientMessage(giveplayerid, COLOR_WHITE, "* Escriba /aceptar factura, para pagar la multa.");
TicketOffer[giveplayerid] = playerid;
TicketMoney[giveplayerid] = moneys;
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " That player is not near you !");
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " That player is Offline !");
return 1;
}
}
}
return 1;
}[/pawn]