invalid function or declaration[HELP!]
#1

Dismiss, I think I found the problem.
Reply
#2

try placing
pawn Код:
forward search(playerid);
above the command.
Reply
#3

I'll try but I think I haven't placed some things into the code that I should have.
Reply
#4

pawn Код:
foward search(playerid);

    if(!strcmp(cmdtext, "/search"))
    {
        if (GetPlayerInterior(playerid) == 1)
        {
            SetTimerEx("search", 30*1000, false, "i", playerid);
        }
        else
        {
            SendClientMessage(playerid, 0xFF0000FF, "[ERROR: You aren't in a lootable interior!]");
        }
        return 1;
    }
    return 0;
}

public search(playerid)
{
    new r = random(3);
    if (r==0)
    {
        GivePlayerWeapon(playerid, 5, 1);
    }
    else if (r==1)
    {
        GivePlayerWeapon(playerid, 24, 50);
    }
    else if (r==2)
    {
        GivePlayerWeapon(playerid, 25, 30);
    }
    return 1;
}
Integers always start at 0, first number in random will be 0.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)