22.01.2014, 11:21
hi all , i have a problem with the command /blowgate , when 1 player use this command , that player can't plant the bomb...if ID 0 is not near this player who want to plant... what i can do ? i have 2 publics and 1 command.
Public Nr.1 :
Public Nr.2 :
if any1 don't understand what i say...pleasy say
PS: srry for my bad englesh
Код:
CMD:blowgate(playerid, params[]) { if(IsPlayerInRangeOfPoint(playerid, 5,1446.4800, 663.3500, 13.2300)) { SetTimer("BlowgateRange", 10000, false); GameTextForPlayer(playerid, "~r~please~n~~y~wait here", 10000, 3); SetPlayerChatBubble(playerid, "Planting...", red, 100.0, 10000); return 1; } else return SendClientMessage(playerid,red,"You are not near gate!"); }
Код:
public BlowgateRange(playerid) { if(IsPlayerInRangeOfPoint(playerid, 5,1446.4800, 663.3500, 13.2300)) { if(AccInfo[playerid][c4] > 0) { if(GetGVarInt( "gates", 1) == 0) { GetPlayerPos(playerid, bx[playerid], by[playerid], bz[playerid]); detonate = CreatePickup(1252, 23, bx[playerid], by[playerid], bz[playerid]); SetTimer("Blowgate", 10000, false); GameTextForPlayer(playerid, "~r~bomb~n~~y~planted", 3000, 3); return 1; } else if(GetGVarInt( "gates", 1) == 1) { SendClientMessage(playerid, red, "Gate allready destroyed"); return 1; } } else return SendClientMessage(playerid,red,"You don't have enought C4"); } else return SendClientMessage(playerid,red,"You are not near gate!"); return 1; }
Код:
public Blowgate(playerid) { DestroyPickup(detonate); DestroyObject(pthug); if(C4Veh[playerid] == 0) { CreateExplosion(bx[playerid], by[playerid], bz[playerid], 7, 15) && CreateExplosion(bx[playerid], by[playerid], bz[playerid], 7, 15) && CreateExplosion(bx[playerid], by[playerid], bz[playerid], 7, 15); GameTextForPlayer(playerid, "~r~bomb~n~~y~exploded", 3000, 3); } AccInfo[playerid][c4] -= 1; Planted[playerid] = 0; SetGVarInt( "gates", 1, 1 ); }

PS: srry for my bad englesh