[Pomoc] Komanda za oruzje

Započeo Matteo, Septembar 20, 2010, 15:23:04 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 4 gostiju pregledaju ovu temu.


Najvjerojatnije ih nemas pa moras napraviti taj folder. A taj folder moras napraviti folderu gdje se nalazi i pawno i gamemodes i filterscripts pod imenom "plugins". I onda unutra stavi sscanf.dll
Poslednja Izmena: Septembar 21, 2010, 16:36:14 POSLE PODNE od Paradox

Last nick: Paradox


Bilogdje u server.cfg napisi plugins sscanf

Last nick: Paradox


Citat: gonss poslato Septembar 20, 2010, 16:23:28 POSLE PODNE
//----------------------------------[GiveGun]------------------------------------------------
if(strcmp(cmd, "/givegun", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /givegun [playerid/PartOfName] [weaponid(eg. 46 = Parachute)] [ammo]");
return 1;
}
new playa;
new gun;
new ammo;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
gun = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /givegun [playerid/PartOfName] [weaponid] [ammo]");
SendClientMessage(playerid, COLOR_GRAD4, "3(Club) 4(knife) 5(bat) 6(Shovel) 7(Cue) 8(Katana) 10-13(Dildo) 14(Flowers) 16(Grenades) 18(Molotovs) 22(Pistol) 23(SPistol)");
SendClientMessage(playerid, COLOR_GRAD3, "24(Eagle) 25(shotgun) 29(MP5) 30(AK47) 31(M4) 33(Rifle) 34(Sniper) 37(Flamethrower) 41(spray) 42(exting) 43(Camera) 46(Parachute)");
return 1;
}
if(gun < 1||gun > 46||gun==27||gun==1||gun==2||gun==9||gun==17||gun==19||gun==20||gun==21||gun==36||gun==38||gun==39||gun==40||gun==44||gun==45)
{ SendClientMessage(playerid, COLOR_GRAD1, "   wrong WeaponID!"); return 1; }
tmp = strtok(cmdtext, idx);
ammo = strval(tmp);
if(ammo <1||ammo > 999)
{ SendClientMessage(playerid, COLOR_GRAD1, "   dont go below 1 or above 999 bullets!"); return 1; }
if (PlayerInfo[playerid][pAdmin] >= 4)
{
    if(IsPlayerConnected(playa))
    {
        if(playa != INVALID_PLAYER_ID)
        {
GivePlayerWeapon(playa, gun, ammo);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "   Nisi Ovlasten da koristis tu komandu!");
}
}
return 1;
}

to?
E hvala ti za ovo,bas mi je posluzilo na mome modu,imao je bug sa tin a sada radi :)
Extreme Generation - 178.63.80.210 :7871