08.02.2009, 12:58
Hello All i need a little help with PayPlayerInArea
This is The Commandsbut i make this in Pirate Ship but i not Gain money when i go there :
Any One can help me
Код:
public PayPlayerInArea(playerID, Float:x1, Float:y1, Float:x2, Float:y2, cash) { if(IsPlayerConnected(playerID)) { new Float:X, Float:Y, Float:Z; GetPlayerPos(playerID, X, Y, Z); if(X >= x1 && X <= x2 && Y >= y1 && Y <= y2) { GivePlayerMoney(playerID, cash); return 1; } } return 0; }
Код:
public PirateShipScoreUpdate() { for(new i=0; i<MAX_PLAYERS; i++) { PayPlayerInArea(i, 1995.5, 1518.0, 2006.0, 1569.0, 100); // { // SendClientMessage(i, COLOR_YELLOW, "You earned money for holding the pirate ship."); // } } }