Some gate-script error
#3

Quote:
Originally Posted by EV007
Посмотреть сообщение
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/toll", true))
    {
        if(IsPlayerInRangeOfPoint(playerid, 15.0, 1806.19921875, 926.7998046875, 8.3000001907349)
        {
            if(GetPlayerWantedLevel(playerid) > 4)
            {
                new tmp[64];
                format(tmp, sizeof(tmp), "Your current wanted level is: %i you cannot pass the toll!", GetPlayerWantedLevel(playerid));
                SendClientMessage(playerid, 0xFF0000FF, tmp);
            }
            else
            {
                SetTimerEx("CloseGate", 7000, false, "i", playerid);
                GivePlayerMoney(playerid, -50);
                MoveObject(Gate, 1806.1999511719, 926.79998779297, 8.3000001907349, 3.0, 0.0, 359.25, 0.0);
                SendClientMessage(playerid, 0x006EFFFF, "You paid toll, you are ready to go!");
            }
        }
        return 1;
    }
    return 0;
}
I believe this will work, but you need to learn how to code, you are doing things that are unnecessary, I doubt you at least understand what you even wrote in your code.
Thanks, yes I know what im writing, bu I not allways know how to do it exactly :$
But how to fix the money?
It takes the money from the player and, then it give is bacK?
Reply


Messages In This Thread
Some gate-script error - by jeremy8810 - 19.07.2012, 11:27
Re: Some gate-script error - by EV007 - 19.07.2012, 11:36
Re: Some gate-script error - by jeremy8810 - 19.07.2012, 11:44
Re: Some gate-script error - by NinjaChicken - 19.07.2012, 12:09
Re: Some gate-script error - by jeremy8810 - 19.07.2012, 12:32

Forum Jump:


Users browsing this thread: 1 Guest(s)