11.05.2014, 02:42
So i am trying to make a inventory system for my GM from scratch but the problem is i finished the command but when i try to test it ingame it doesn't work at all.
here is the code
here is the code
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/i use", true))
{
new itemslot,string[128];
if(sscanf(cmdtext,"i",itemslot))
{
SendClientMessage(playerid,-1,"USAGE: /i use (itemslot).");
return 1;
}
if(itemslot == 1)
{
itemslot = pInfo[playerid][pInv1];
if(pInfo[playerid][pInv1] == 995)
{
SendClientMessage(playerid,-1,"The command works");
}
return 1;
}
return 1;
}
return 0;
}