GiveWeapon
#1

Hii..
I made my command /giveweapon
but i get fu**ing error..


L:\Users\Dino\Documents\Dino\SAMP\samp03csvr_R2-2_win32\gamemodes\sxrp.pwn(497) : error 010: invalid function or declaration


COMMAND:
Код:
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;
}
Reply
#2

Add 'else{' after your closing bracket on your sscanf conditional
Reply
#3

I don't understand u .. can u put on command?
ty..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)