SA-MP Forums Archive
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: Explode (/showthread.php?tid=581677)



Explode - TenTen - 14.07.2015

explode cmd please


Re: Explode - J0sh... - 14.07.2015

Make one?
PHP код:
CMD:explode(playeridparams[]) {
    new 
Float:xFloat:yFloat:z;
    
GetPlayerPos(playeridxyz);
    
CreateExplosion(xyz610.0);
    return 
1;




Re: Explode - iTakelot - 14.07.2015

PHP код:
command(explodirplayeridparams[]) {
    if(!
IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1"[ERRO]: Vocк Nгo Tem Permissгo Para Usar Esse Comando Apenas Admin 1+ !.");
    new
          
explodido,
            
Float:x,
        
Float:y,
        
Float:z
    
;
    if(
sscanf(params,"u",explodido)) return SendClientMessage(playerid, -1,"[USO]:/explodir [ID]");
    if(!
IsPlayerConnected(explodido)) return SendClientMessage(playerid, -1,"[ERRO]: Jogador nгo conectado");
    
GetPlayerPos(explodido,x,y,z);
    
CreateExplosion(x,y,z,7,10.0);
    return 
1;




Re: Explode - Darkwood17 - 14.07.2015

Код:
CMD:explode(playerid, params[])
{
	new string[128], ID, Float:x, Float:y, Float:z; //Define ID (the playerid you are going to explode) and the floats where the explosion shall be created (ID's position).
	if(sscanf(params, "u", ID)) SendClientMessage(playerid, -1, "Correct usage: /explode <playerid/name>"); //Show a message with correct usage of the command, if inputted wrong.
	else if(!IsPlayerConnected(ID)) SendClientMessage(playerid, -1, "That player is not online."); //Output if ID is not online.
	else //If everything has gone fine, do this.
	{
		GetPlayerPos(ID, x, y, z); //Get ID's pos and store the pos in the floats x, y, z.
		CreateExplosion(x, y, z, 12, 10.0); //Create an explosion at the pos retrieved from x, y, z.
	    format(string,sizeof(string), "You have exploded %s(%d).", PlayerName(ID), ID); //Store neat message showing that you've exploded "IDsName(ID)", eg. Barry(16) in string.
		SendClientMessage(playerid, -1, string); //Output the string to the client.
	}
}
Resource: https://sampforum.blast.hk/showthread.php?tid=370288


Re: Explode - TenTen - 15.07.2015

Thank you all