[POMOĆ] GiveWeapon

Započeo TiXoR_, Maj 14, 2011, 20:24:06 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Skripta koju koristim: Mod 0
Detaljan opis problema: radio sam komandu /giveweapon i dobia san error oko kojeg se mučim.. -.-
L:\Users\Dino\Documents\Dino\SAMP\samp03csvr_R2-2_win32\gamemodes\sxrp.pwn(497) : error 010: invalid function or declaration
Dio skripte:
CMD:giveweapon(playerid, params[]) {
new
id,
weapon;
if(sscanf(params, "u", id)) {

SendClientMessage(playerid, COLOR_ORANGE, "/giveweapon [playerid]");
}
weapon = GetPlayerWeapon(playerid);

switch(weapon) {
case 16, 18, 35, 36, 37, 38, 39, 40, 44, 45, 46, 0: SendClientMessage(playerid, SPLAVA, "Invalid weapon.");
default: {
SetPVarInt(id,"gunID",playerid);
SetPVarInt(playerid,"gun",weapon);
SetPVarInt(playerid,"slot",GetWeaponSlot(weapon));
}
}
    }
return 1;
}




Neke slike/video za lakse dobivanje pomoci(neobavezno): ///

CMD:giveweapon(playerid, params[])

    new 
    id, 
    weapon;
    weapon = GetPlayerWeapon(playerid);   
    if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_ORANGE, "/giveweapon [playerid]"); 
        if(weapon == 16 || weapon == 18 || weapon == 35 || weapon == 36 || weapon == 37 || weapon == 38 || weapon == 39 || weapon == 40 || weapon == 44 || weapon == 45 || weapon == 46 || weapon == 0) return SendClientMessage(playerid, SPLAVA, "Invalid weapon.");
        SetPVarInt(id,"gunID",playerid); 
        SetPVarInt(playerid,"gun",weapon); 
        SetPVarInt(playerid,"slot",GetWeaponSlot(weapon)); 
        return true; 
}

ps. jer imas u modu getweaponslot???

Komanda ne radi...
Iman getweaponslot

Jel zelis da igrac da nekom drugom igracu ili da kao admin spawnas?