SA-MP Forums Archive
problem in a explode - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: problem in a explode (/showthread.php?tid=412230)



problem in a explode - karni357 - 01.02.2013

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;
    } 



Re: problem in a explode - Shabi RoxX - 01.02.2013

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

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


Re: problem in a explode - GhostDeath - 01.02.2013

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