12.03.2017, 21:39
PHP код:
CMD:darlr(playerid, params[])
{
if(InfoJugador[playerid][jAdmin] < 3)
return SendClientMessage(playerid, -1, "Necesitas ser administrador para usar este comando");
new Jugador, Cantidad, Razon[25], string[128];
if(sscanf(params, "uiS(Sin razуn)[25]", Jugador, Cantidad, Razon))
return SendClientMessage(playerid, -1, "Uso: /darlr [PlayerID] [Cantidad] [Razon]");
if(!IsPlayerConnected(Jugador))
return SendClientMessage(playerid, -1, "Jugador no conectado");
if(Cantidad > 99999)
return SendClientMessage(playerid, -1, "Cantidad invalida!");
InfoJugador[Jugador][jCoins] += Cantidad;
format(string, sizeof(string), "Informaciуn: El administrador %s te dio %d coins LR, razуn: %s", RetornarNombre(playerid), Cantidad, Razon);
SendClientMessage(Jugador, -1, string);
format(string, sizeof(string), "Advertencia: El administrador %s le sumу %d coins LR a %s, razуn: %s", RetornarNombre(playerid), Cantidad, RetornarNombre(Jugador), Razon);
EnviarMensajeAdmin(-1, string);
format(string, sizeof(string), "Informaciуn: Le diste %d coins a el jugador %s, razуn: %s", Cantidad, RetornarNombre(Jugador), Razon);
SendClientMessage(playerid, -1, string);
return true;
}