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?