30.07.2018, 23:46
Olб galera, eu estou com uma gm editando uma gm aqui e preciso de um comando pois na gm tem um sistema de pegar caixas (presentes) por payday e eu queria poder criar um comando que o admin logado na rcon pode-se dar qualquer quantidade de caixas para qualquer pessoa online no servidor, por favor se alguйm souber como fazer ajudem-me.
Код HTML:
CMD:presente(playerid){
if(PlayerToPoint(2.0,playerid,1480.2086,-1639.5801,14.1484))
{
new str1[50], string[256];
new cu;
new rand = random(34);
if(rand == 10 ) cu = 19059;
if(rand == 7 || rand == 8 || rand == 21 || rand == 33) cu = 19056;
if(rand == 2 ) cu = 19057;
if(rand == 6 || rand == 5 || rand == 4 || rand == 14 || rand == 19 || rand == 20 || rand == 22 || rand == 25 || rand == 26 || rand == 30 || rand == 31) cu = 19055;
if(rand == 3 || rand == 1 || rand == 9 || rand == 0 || rand == 12 || rand == 11 || rand == 13 || rand == 15 || rand == 16 || rand == 17 || rand == 18 || rand == 23 || rand == 24 || rand == 27 || rand == 28 || rand == 29 || rand == 32) cu = 19054;
if(PlayerInfo[playerid][pCaixinha] == char) return SendClientMessage(playerid, COLOR_WHITE, "Vocк jб pegou sua caixa surpresa, volte no proximo payday.");
if(cu == 19054) format(str1, sizeof(str1), "Caixa Supresa {F78181}Pequena{FFFFFF}");
if(cu == 19055) format(str1, sizeof(str1), "Caixa Supresa {5FB404}Mйdia{FFFFFF}");
if(cu == 19056) format(str1, sizeof(str1), "Caixa Supresa {FACC2E}Grande{FFFFFF}");
if(cu == 19057) format(str1, sizeof(str1), "Caixa Supresa {00FFFF}Platina{FFFFFF}");
if(cu == 19059) format(str1, sizeof(str1), "Caixa Supresa {800080}Copa Do Mundo 2018{FFFFFF}");
for(new i=0; i<75; i++)
{
if(InventarioInfo[playerid][i][iSlot] == 19382)
{
InventarioInfo[playerid][i][iSlot] = cu;
InventarioInfo[playerid][i][iUnidades] = 1;
PlayerInfo[playerid][pCaixinha] = char;
format(string, sizeof(string), "[Caixa Surpresa]:{FFFFFF} %s(ID:%d) pegou uma | %s. (/infocaixas)",PlayerName(playerid),playerid,str1);
SendClientMessageToAll(COLOR_LIGHTBLUE,string);
format(string, sizeof(string), "* A Caixa Surpresa estб em seu inventбrio, use /inventario para abri-lу.");
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
return 1;
}
}
SendClientMessage(playerid, COLOR_LIGHTRED, "* Seu inventбrio estб cheio!");
}
return 1;
}

