Jump to content

Comanda /explode


Onehitkill

Recommended Posts

Am si eu aceasta comanda si vreau sa pun un timer cand sa explodeze

CMD:explode(playerid,params[])
{
    new pid;
    if(sscanf(params,"u",pid))return SendClientMessage(playerid,0xff0000FF,"ERROR: Usage /explode [playerid/name]");
    if(pid != INVALID_PLAYER_ID && IsPlayerConnected(pid))
    {
        new Float:x,Float:y,Float:z;
        GetPlayerPos(pid,x,y,z);
        GameTextForPlayer(pid,"Alakh Akhbar!",3000,3);
        return 1;
    }
    else SendClientMessage(playerid,0xff0000FF,"ERROR: Player not found");
    return 1;
}

 

Link to comment
Share on other sites

Acum 14 minute, Onehitkill a spus:

Am si eu aceasta comanda si vreau sa pun un timer cand sa explodeze


CMD:explode(playerid,params[])
{
    new pid;
    if(sscanf(params,"u",pid))return SendClientMessage(playerid,0xff0000FF,"ERROR: Usage /explode [playerid/name]");
    if(pid != INVALID_PLAYER_ID && IsPlayerConnected(pid))
    {
        new Float:x,Float:y,Float:z;
        GetPlayerPos(pid,x,y,z);
        GameTextForPlayer(pid,"Alakh Akhbar!",3000,3);
        return 1;
    }
    else SendClientMessage(playerid,0xff0000FF,"ERROR: Player not found");
    return 1;
}

 

Poftim, la timer BoomBoom ai [3000] alea sunt 3 secunde.

CMD:explode(playerid,params[])
{
    new pid;
    if(sscanf(params,"u",pid))return SendClientMessage(playerid,0xff0000FF,"ERROR: Usage /explode [playerid/name]");
    if(pid != INVALID_PLAYER_ID && IsPlayerConnected(pid))
    {
        defer BoomBoom(pid);
        return 1;
    }
    else SendClientMessage(playerid,0xff0000FF,"ERROR: Player not found");
    return 1;
}
timer BoomBoom[3000](pid)
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(pid, x, y, z);
    CreateExplosion(x, y, z, 0, 5.0);
  	SetPlayerHealth(pid, 0);
    GameTextForPlayer(pid, "Alakh Akhbar!", 3000, 3);
    return 1;
}

 

Edited by StrikerM

Ce inseamna cuvantul "Unic" este atunci cand Chestia / Obiectul / Idea / etc... nu exista in alta parte.

Copii, nu mai veniti cu vorbe de "Am gamemode unic", nu exista asa ceva, la ora actuala totul este pe net.

Aveti grija pe cine ajutati, majoritatea sunt caini.

Link to comment
Share on other sites

Acum 5 minute, Banditul a spus:

Ce erori mai exact? Ca mie mi se pare corect cu mentiunea ca ce cod ti-a oferit Striker se foloseste de YSI Timers ceea e folosit ca tu sa nu folosesti de unde si erorile

Errorile sunt tot gm-ul, dar trebuia pus cu tot cu settimer in acelasi loc ?

Link to comment
Share on other sites

Acum 6 ore, Onehitkill a spus:

Errorile sunt tot gm-ul, dar trebuia pus cu tot cu settimer in acelasi loc ?

Eu am crezut ca lucrezi pe un GM mai nou mai toate au y_timers.

Adauga sus de tot

#include 		<YSI\y_timers>

Daca nu il ai, poti sa cauti pe net

Edited by StrikerM

Ce inseamna cuvantul "Unic" este atunci cand Chestia / Obiectul / Idea / etc... nu exista in alta parte.

Copii, nu mai veniti cu vorbe de "Am gamemode unic", nu exista asa ceva, la ora actuala totul este pe net.

Aveti grija pe cine ajutati, majoritatea sunt caini.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.