problem in a explode
#1

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 
i5i++) 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;
    } 
Reply
#2

Don't know if createExplosion will effect the player but you can use

pawn Код:
SetPlayerHealth(id, 0);
to kill player
Reply
#3

Quote:
Originally Posted by Shabi RoxX
Посмотреть сообщение
Don't know if createExplosion will effect the player but you can use

pawn Код:
SetPlayerHealth(id, 0);
to kill player
Yep , and if you don't want to completely kill the player just make the 0 50 or something
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)