01.02.2013, 11:26
I have a problem in explode as soon as I found the car and I make myself explode so it does not kill me only makes the vehicle to catch fire!
PHP код:
if(strcmp("/explode",cmd,true) == 0)
{
if(Ad[playerid][Level] < 4) return SendClientMessage(playerid,0xff0000ff,"тм оръ мбцт фчегд же тмйк мдйеъ агойп бшод 4");
new tmp[128],string[128];
tmp = strtok(cmdtext,idx), id = strval(tmp);
if(!strlen(tmp)) return SendClientMessage(playerid,-1,"Usage: /Explode [ID]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,0xff0000ff,"аййгй щвей");
GetPlayerPos(id,X,Y,Z);
GetVehiclePos(GetPlayerVehicleID(id),X,Y,Z);
for(new i; i < 5; i++) CreateExplosion(X,Y,Z,10,0);
format(string,sizeof(string),"The admin %s has explode %s",GetName(playerid),GetName(id));
SendClientMessageToAll(0xffff00ff,string);
format(string,sizeof(string),"The admin %s has explode you",GetName(playerid));
SendClientMessage(id,0xffff00ff,string);
format(string,sizeof(string),"You have explode %s",GetName(playerid));
SendClientMessage(playerid,0xffff00ff,string);
return 1;
}