17.12.2018, 13:39
Olб, eu estou com um problema em um comando que eu criei, o comando й o seguinte: й um comando que somente admins tem acesso e que da armas para jogadores, porem quando eu digito o comando, ate da a arma, porem ela some logo depois. Espero que me ajudem, segue abaixo o codigo.
PHP код:
CMD:dararma(playerid, params[])
{
if (PlayerInfo[playerid][Admin] >= 4)
{
new arma;
new id;
new muni;
if (sscanf(params, "ud", id, arma, muni))
return SendClientMessage(playerid, 0xFF0000AA, "[ERRO] Use: /dararma [ID] [ARMA] [MUNI]");
GivePlayerWeapon(id, arma, muni);
new nick1[MAX_PLAYER_NAME];
new nick2[MAX_PLAYER_NAME];
new str[128];
GetPlayerName(playerid, nick1, MAX_PLAYER_NAME);
GetPlayerName(id, nick2, MAX_PLAYER_NAME);
format(str, sizeof str, "O Admin: %s deu uma arma para o jogador %s", nick1, nick2);
SendClientMessageToAll(0xFF80FFAA, str);
return 1;
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "[ERRO] Vocк nгo tem permiзгo!");
return 1;
}
return 1;
}


