11.09.2011, 15:32
pawn Код:
CMD:dararma(playerid, params[])
{
if(PlayerInfo[playerid][Adminlevel] < 1) return SendClientMessage(playerid,COLOR_RED,".:: You are not authorized to use this command ::.");
new id, arma, bala;
new nome[MAX_PLAYER_NAME][2];
new string[128];
if(sscanf(params, "dii",id, arma, bala))
{
SendClientMessage(playerid, COLOR_WHITE, "Comando: /dararma [ID] [Arma] [Balas]");
SendClientMessage(playerid, COLOR_WHITE, "________________________[ Lista de Armas ]________________________");
SendClientMessage(playerid, COLOR_WHITE, "Comando: /dararma [playerid/PartOfName] [weaponid] [balas]");
SendClientMessage(playerid, COLOR_WHITE, "3(Club) | 4(knife) | 5(bat) | 6(Shovel) | 7(Cue) | 8(Katana) | 10-13(Dildo) | 14(Flowers)");
SendClientMessage(playerid, COLOR_WHITE, "16(Grenades) | 18(Molotovs) | 22(Pistol) | 23(SPistol) 24(Eagle) | 25(Shotgun) | 27(SPAS12)");
SendClientMessage(playerid, COLOR_WHITE, "29(MP5) | 30(AK47) | 31(M4) | 33(Rifle) | 34(Sniper) | 35(Bazooka) | 37(Flamethrower)");
SendClientMessage(playerid, COLOR_WHITE, "41(Spray) | 42(Fire Extinguisher) | 43(Camera) | 46(Parachute)");
SendClientMessage(playerid, COLOR_WHITE, "______________________________________________________________");
return true;
}
if(arma > 1||arma < 47) return SendClientMessage(playerid,-1,"((minimo - 1 | Maximo - 47))");
if(bala <1||bala > 999) return SendClientMessage(playerid, COLOR_WHITE, "Tens de escolher entre , 1-999 balas.");
GetPlayerName(id, nome[0], 24);
GetPlayerName(playerid, nome[1], 24);
format(string, 128, "[%s]deu ao player %s a arma - %d com %d balas.", nome[0], nome[1], arma, bala);
SendClientMessage(playerid, COLOR_WHITE, string);
GivePlayerWeapon(id, arma, bala);
return 1;
}