10.01.2012, 00:13
need help with this i get these errors:
with this code:
pawn Код:
C:\Documents and Settings\BaLLy\Desktop\The Original\pawno\include\PPC_PlayerCommands.inc(11) : error 017: undefined symbol "string"
C:\Documents and Settings\BaLLy\Desktop\The Original\pawno\include\PPC_PlayerCommands.inc(12) : warning 217: loose indentation
C:\Documents and Settings\BaLLy\Desktop\The Original\pawno\include\PPC_PlayerCommands.inc(12) : error 017: undefined symbol "string"
pawn Код:
CMD:giveweapon(playerid,params[])
{
SendAdminText(playerid, "/giveweapon", params);
if (!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF0000FF,"You have to be admin to do this");
new ID, GUN, AMMO;//Creates th variables
if(sscanf(params, "uii", ID, GUN, AMMO)) return SendClientMessage(playerid,-1,"{ff0000}Usage: /giveweapon [id part of name] [gunid] [ammo]");//if the player enters the wrong params
if(GUN == 0 || GUN >= 45) return SendClientMessage(playerid, -1, "Invalid gun id!");//if the gunid is invalid
if(IsPlayerConnected(ID) && ID != INVALID_PLAYER_ID)//if the player is connected and is valid
{
GivePlayerWeapon(ID, GUN, AMMO);//Gives the GUN and AMMO specified
format(string, 128, "Admin {ff0000}%s {00ff00}has given {ff0000}%s {00ff00}", AdminLevelName[APlayerData[playerid][PlayerLevel]], Name);
SendClientMessageToAll(0x00ff00FF,string);
}
return 1;
}