01.10.2010, 15:47
I tired to make a Giveweapon command but it didn't work.
I have to warnings:
I have to warnings:
PHP код:
C:\Documents and Settings\My Documents\Downloads\samp03bsvr_R2_win32\filterscripts\slap.pwn(187) : error 004: function "giveweaponstohim" is not implemented
C:\Documents and Settings\My Documents\Downloads\samp03bsvr_R2_win32\filterscripts\slap.pwn(207) : error 030: compound statement not closed at the end of file (started at line 162)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
PHP код:
forward giveweaponstohim(otherId, gunID, gunAmmo);
CMD:gw(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF4646FF, "You are not authorized to use that command !");
else
{
new otherId;
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
new string[256];
if(sscanf(params, "u", otherId)) return SendClientMessage(playerid, 0xAFAFAFAA, "USAGE: gw [PlayerID/PartOfName] [Weapon ID] [Ammo]");
format(string, sizeof(string), "* You Jailed %s.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
if(otherId == INVALID_PLAYER_ID) return SendClientMessage(otherId, 0xAFAFAFAA, "Invalid Player ID");
{
{
new gunID = GetPlayerWeapon(playerid);
new gunAmmo = GetPlayerAmmo(playerid);
GetPlayerName(playerid, sendername, sizeof(sendername));
if(gunID != 0 && gunAmmo != 0)
{
giveweaponstohim(otherId, gunID, gunAmmo);
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* You have been given a weapon by Admin %s ", sendername );
SendClientMessage(playerid, 0xFF4646FF, string);
}
}
return 1;
}