[Help] Some cmd..
#1

Okay so, I got this command:

pawn Код:
if (strcmp(cmd, "/loadtrash", true) == 0)
{
    if(PlayerInfo[playerid][pJob] == 1)
    {
        new vehicle = GetPlayerClosestVehicle(5.0, playerid);
        if(vehicle)
        {
            if(IsGarbageTruck(vehicle))
            {
                Trash[vehicle] += gHasTrash[playerid];
                format(string, sizeof(string), "You have loaded %d trash into the trashmaster, trashmaster trash: %d/20", gHasTrash[playerid], Trash[vehicle]);
                SCM(playerid, 0x8CFFFFFF, string);
                gHasTrash[playerid] = 0;
            }
            else if(!IsGarbageTruck(vehicle))
            {
                SCM(playerid, COLOR_GREY, "You can only load trash into garbage trucks.");
            }
        }
        else
        {
            SCM(playerid, COLOR_GREY, "You are not near a garbage truck.");
        }
    }
    else
    {
        SCM(playerid, COLOR_GREY, "* You are not a garbage collector.");
    }
    return 1;
}
And I got a problem with it.
The problem is.. when I type the cmd and I'm near a garbage truck or not, it gives me this message:
"You can only load trash into garbage trucks."
Reply


Messages In This Thread
[Help] Some cmd.. - by Maxips2 - 16.07.2010, 18:08
Re: [Help] Some cmd.. - by DJDhan - 16.07.2010, 18:16
Re: [Help] Some cmd.. - by Maxips2 - 16.07.2010, 18:24
Re: [Help] Some cmd.. - by ikey07 - 16.07.2010, 18:29
Re: [Help] Some cmd.. - by DJDhan - 16.07.2010, 18:33
Re: [Help] Some cmd.. - by Maxips2 - 16.07.2010, 18:49
Re: [Help] Some cmd.. - by Joe_ - 16.07.2010, 18:54
Re: [Help] Some cmd.. - by Maxips2 - 16.07.2010, 19:02
Re: [Help] Some cmd.. - by DJDhan - 16.07.2010, 19:04
Re: [Help] Some cmd.. - by Maxips2 - 16.07.2010, 19:05

Forum Jump:


Users browsing this thread: 1 Guest(s)