15.03.2009, 09:13
Quote:
Originally Posted by GTA_Rules
![]() Just one last question, how come I still keep my 50.000$? |
use this
Код:
// On top forward BlastBomb(); new Float:X, Float:Y, Float:Z; // In OnPlayerCommandText new playercash = GetPlayerMoney(playerid); if(strcmp(cmd, "/bomb", true) == 0) { if (playercash < 50000) { SendClientMessage(playerid, COLOR_RED, "You need at least 50.000$ to buy a bomb!"); } else { GetPlayerPos(playerid, X, Y, Z); GivePlayerMoney(playerid, -50000); SendClientMessage(playerid, COLOR_RED, "Bomb planted! 10 seconds till detonation!"); SetTimer("BlastBomb", 10000, 0); SendClientMessage(playerid,COLOR_GREEN, "You have planted a bomb!"); } return 1; } // Somewhere else (outside other functions) public BlastBomb() { CreateExplosion(X, Y, Z, 10, 30.0); return 1; }