Jump to content
  • 0

Comanda arme


Dekker

Question

[pawn]if (strcmp("/armeballas", cmdtext, true) == 0)

    {

if(IsPlayerConnected(playerid))

}

    SendClientMessage(playerid, 0xFFFFFFAA, "Ai primit armele factiunii");

    GivePlayerWeapon(playerid, 24, 500);

    }

    return 1;

    }[/pawn]

Am facut comanda asta , cand compilez imi spune ca PAWNO trebuie sa se opreasca. Cand sterg comanda , se compileaza. Ma poate ajuta cineva sa fac comanda buna ? Multumesc Anticipat.

[email protected] - Orice mapa doriti , add me !

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

Mersi , acum comanda arata asa :

[pawn]if (strcmp("/armeballas", cmdtext, true) == 0)

  {

if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8)

{

SendClientMessage(playerid, 0xFFFFFFAA, "Ai primit armele factiunii");

GivePlayerWeapon(playerid, 24, 500); //deagle

GivePlayerWeapon(playerid, 31, 500); //m4

GivePlayerWeapon(playerid, 29, 500); //mp5

}

return 1;

  }[/pawn]

Vreau ca playerului sa i se ia 5k cand tasteaza aceasta comanda si un timer de 5 minute. Ma puteti ajuta :) ?

[email protected] - Orice mapa doriti , add me !

Link to comment
Share on other sites

[pawn]new timer[MAX_PLAYERS];

public OnPlayerCommandText(playerid, cmdtext[])

{

    if (strcmp("/armeballas", cmdtext, true) == 0)

    {

        if(timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000AA, "Poti lua arme doar odata la 5 minute!");

        if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid, 0xFF0000AA, "Ai nevoie de $5000!");

if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8)

{

    SendClientMessage(playerid, 0xFFFFFFAA, "Ai primit armele factiunii");

            GivePlayerMoney(playerid, -5000);

    GivePlayerWeapon(playerid, 24, 500); //deagle

    GivePlayerWeapon(playerid, 31, 500); //m4

    GivePlayerWeapon(playerid, 29, 500); //mp5

            timer[playerid] = SetTimerEx("timer1",300000,true,"i",playerid);

        }

return 1;

    }

    return 0;

}

forward timer1(playerid);

public timer1(playerid)

{

        timer[playerid] = 0;

        return 1;

}[/pawn]

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.