Explode
#1

explode cmd please
Reply
#2

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

Reply
#3

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;

Reply
#4

Код:
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
Reply
#5

Thank you all
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)