Jump to content
  • 0

Cerere Ajutor C4


xt3z0ne

Question

Nick:Johnny

Problema:Pai am facut un sistem de c4 pentru server ca am nevoie la /blowgate si cand vreau sa cumpar c4 imi apare dialog-u dau buy si cand dau /plantc4 zice ca nu am c4:| Am pus totu in fs

Erori / warnings:!

Lini/script:Chiar nu am nici o eroare nmk.. Nu stiu ce naiba are...

Ai incercat sa rezolvi singur ?:[pawn]#define FILTERSCRIPT

/*

********************************************************************************

***************************** By Johnny ****************************************

********************************************************************************

*/

#include <a_samp>

#include <sscanf2>

#include <zcmd>

//==============================================================================

#define COLOR_ORANGE 0xF97804FF

//==============================================================================

new ASSHasC4[MAX_PLAYERS];

new ASSC4[MAX_PLAYERS];

new ASSC4Timer[MAX_PLAYERS];

new ASSPlantedC4[MAX_PLAYERS];

//==============================================================================

forward C4Process(playerid);

//==============================================================================

public OnFilterScriptInit()

{

print("************************************************");

print("\n  C4 Sistem By Johnny Apocalypse Super Stunt\n");

print("************************************************");

return 1;

}

//==============================================================================

public OnFilterScriptExit()

{

return 1;

}

//==============================================================================

public OnPlayerConnect(playerid)

{

ASSHasC4[playerid] = 0;

ASSPlantedC4[playerid] = 0;

return 1;

}

//==============================================================================

public OnPlayerDisconnect(playerid, reason)

{

ASSHasC4[playerid] = 0;

ASSPlantedC4[playerid] = 0;

return 1;

}

//==============================================================================

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])

{

  if(dialogid == 999)

{

if(response)

{

      if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid,COLOR_ORANGE,"[*] You Don't Have Required Money To Buy This");

          GivePlayerMoney(playerid, -5000);

        ASSHasC4[playerid] = 1;

      }

}

return 1;

}

//==============================================================================

public C4Process(playerid)

{

KillTimer(ASSC4Timer[playerid]);

TogglePlayerControllable(playerid, 1);

return 1;

}

//==============================================================================

CMD:buyc4(playerid,params[])

{

if(ASSHasC4[playerid] == 1) return SendClientMessage(playerid,COLOR_ORANGE,"[*] You Already Have C4, Use It Before Purchasing Again!");

ShowPlayerDialog(playerid,999,DIALOG_STYLE_MSGBOX,"C4 Buy","Are You Sure You Want To Buy C4?\nCosts: 5000$","Yes","No");

return 1;

}

//==============================================================================

CMD:plantc4(playerid,params[])

{

if(ASSPlantedC4[playerid] == 1) return SendClientMessage(playerid,COLOR_ORANGE,"[*] You Have Already Placed The C4.");

if(ASSHasC4[playerid] == 0) return SendClientMessage(playerid,COLOR_ORANGE,"[*] You Donot Have C4, Purchase It From /buyc4!");

new Float:X,Float:Y,Float:Z;

GetPlayerPos(playerid,X,Y,Z);

    ASSC4[playerid] = CreateObject(1654,X,Y,Z,1.5,270.0,0.0,0.0);

    ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 2000);

    ASSC4Timer[playerid] = SetTimerEx("C4Process",700,1,"u",playerid);

    TogglePlayerControllable(playerid, 0);

    GameTextForPlayer(playerid,"~r~You Successfully Placed C4!~n~/bb To Explode It!",4500,4);

    ASSPlantedC4[playerid] = 1;

    return 1;

}

//==============================================================================

CMD:bb(playerid,params[])

{

if(ASSHasC4[playerid] == 0) return SendClientMessage(playerid,COLOR_ORANGE,"[*] You Donot Have C4, Purchase It From /buyc4!");

if(ASSPlantedC4[playerid] == 0) return SendClientMessage(playerid,COLOR_ORANGE,"[*] You Have Not Planted The Bomb Yet");

new Float:X,Float:Y,Float:Z;

GetObjectPos(ASSC4[playerid],X,Y,Z);

CreateExplosion(X, Y, Z, 1, 10.0);

DestroyObject(ASSC4[playerid]);

ASSHasC4[playerid] = 0;

ASSPlantedC4[playerid] = 0;

return 1;

}

[/pawn]

Sunt un retardat

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

[pawn]CMD:plantc4(playerid,params[])

{

if(ASSPlantedC4[playerid] == 1) return SendClientMessage(playerid,COLOR_ORANGE,"[*] You Have Already Placed The C4.");

if(ASSHasC4[playerid] == 0) return SendClientMessage(playerid,COLOR_ORANGE,"[*] You Donot Have C4, Purchase It From /buyc4!");

        else if(ASSHasc4[playerid] > 0)

        {

new Float:X,Float:Y,Float:Z;

GetPlayerPos(playerid,X,Y,Z);

    ASSC4[playerid] = CreateObject(1654,X,Y,Z,1.5,270.0,0.0,0.0);

    ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 2000);

    ASSC4Timer[playerid] = SetTimerEx("C4Process",700,1,"u",playerid);

    TogglePlayerControllable(playerid, 0);

    GameTextForPlayer(playerid,"~r~You Successfully Placed C4!~n~/bb To Explode It!",4500,4);

    ASSPlantedC4[playerid] = 1;

  }

    return 1;

}[/pawn]

8ffTNVU.png

Link to comment
Share on other sites

[pawn]CMD:plantc4(playerid,params[])

{

if(ASSPlantedC4[playerid] == 1) return SendClientMessage(playerid,COLOR_ORANGE,"[*] You Have Already Placed The C4.");

if(ASSHasC4[playerid] == 0) return SendClientMessage(playerid,COLOR_ORANGE,"[*] You Donot Have C4, Purchase It From /buyc4!");

        else if(ASSHasc4[playerid] > 0)

        {

new Float:X,Float:Y,Float:Z;

GetPlayerPos(playerid,X,Y,Z);

    ASSC4[playerid] = CreateObject(1654,X,Y,Z,1.5,270.0,0.0,0.0);

    ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 2000);

    ASSC4Timer[playerid] = SetTimerEx("C4Process",700,1,"u",playerid);

    TogglePlayerControllable(playerid, 0);

    GameTextForPlayer(playerid,"~r~You Successfully Placed C4!~n~/bb To Explode It!",4500,4);

    ASSPlantedC4[playerid] = 1;

  }

    return 1;

}[/pawn]

La fel boss

Sunt un retardat

Link to comment
Share on other sites

[pawn]if(dialogid == 999)

{

if(response)

{

      if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid,COLOR_ORANGE,"[*] You Don't Have Required Money To Buy This");

          GivePlayerMoney(playerid, -5000);

        ASSHasC4[playerid] += 1;

      }

}

return 1;[/pawn]

8ffTNVU.png

Link to comment
Share on other sites

Comanda /plantc4 inlocuiesteo cu asta :

CMD:plantc4(playerid,params[])
{
	if(ASSPlantedC4[playerid] == 1)
		return SendClientMessage(playerid,COLOR_ORANGE,"[*] You Have Already Placed The C4.");

	if(ASSHasC4[playerid] == 0)
		return SendClientMessage(playerid,COLOR_ORANGE,"[*] You Donot Have C4, Purchase It From /buyc4!");

	new Float:X,Float:Y,Float:Z;
	GetPlayerPos(playerid,X,Y,Z);
    ASSC4[playerid] = CreateObject(1654,X,Y,Z,1.5,270.0,0.0,0.0);
    ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 2000);
    ASSC4Timer[playerid] = SetTimerEx("C4Process",700,1,"u",playerid);
    TogglePlayerControllable(playerid, 0);
    GameTextForPlayer(playerid,"~r~You Successfully Placed C4!~n~/bb To Explode It!",4500,4);
    ASSPlantedC4[playerid] = 1;

    return 1;
}
si la ondialogresponde ce ai tu inlocuieste cu asta :
   	if(dialogid == 999)
	{
		if(response)
		{
 	      if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid,COLOR_ORANGE,"[*] You Dont Have Required Money To Buy This");
          GivePlayerMoney(playerid, -5000);
       	  ASSHasC4[playerid] += 1;
       }
	}

Link to comment
Share on other sites

Comanda /plantc4 inlocuiesteo cu asta :

CMD:plantc4(playerid,params[])
{
	if(ASSPlantedC4[playerid] == 1)
		return SendClientMessage(playerid,COLOR_ORANGE,"[*] You Have Already Placed The C4.");

	if(ASSHasC4[playerid] == 0)
		return SendClientMessage(playerid,COLOR_ORANGE,"[*] You Donot Have C4, Purchase It From /buyc4!");

	new Float:X,Float:Y,Float:Z;
	GetPlayerPos(playerid,X,Y,Z);
    ASSC4[playerid] = CreateObject(1654,X,Y,Z,1.5,270.0,0.0,0.0);
    ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 2000);
    ASSC4Timer[playerid] = SetTimerEx("C4Process",700,1,"u",playerid);
    TogglePlayerControllable(playerid, 0);
    GameTextForPlayer(playerid,"~r~You Successfully Placed C4!~n~/bb To Explode It!",4500,4);
    ASSPlantedC4[playerid] = 1;

    return 1;
}
si la ondialogresponde ce ai tu inlocuieste cu asta :
   	if(dialogid == 999)
	{
		if(response)
		{
 	      if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid,COLOR_ORANGE,"[*] You Dont Have Required Money To Buy This");
          GivePlayerMoney(playerid, -5000);
       	  ASSHasC4[playerid] += 1;
       }
	}

La fel :|

Sunt un retardat

Link to comment
Share on other sites

[pawn]CMD:plantc4(playerid,params[])

{

    if(ASSPlantedC4[playerid] == 1)

        return SendClientMessage(playerid,COLOR_ORANGE,"[*] You Have Already Placed The C4.");

       

    if(ASSHasC4[playerid] < 1)

        return SendClientMessage(playerid,COLOR_ORANGE,"[*] You Donot Have C4, Purchase It From /buyc4!");

    new Float:X,Float:Y,Float:Z;

    GetPlayerPos(playerid,X,Y,Z);

    ASSC4[playerid] = CreateObject(1654,X,Y,Z,1.5,270.0,0.0,0.0);

    ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 2000);

    ASSC4Timer[playerid] = SetTimerEx("C4Process",700,1,"u",playerid);

    TogglePlayerControllable(playerid, 0);

    GameTextForPlayer(playerid,"~r~You Successfully Placed C4!~n~/bb To Explode It!",4500,4);

    ASSPlantedC4[playerid] = 1;

    return 1;

}[/pawn]

7bdea99b11.png

rimmon curv.

Link to comment
Share on other sites

[pawn]CMD:plantc4(playerid,params[])

{

    if(ASSPlantedC4[playerid] == 1)

        return SendClientMessage(playerid,COLOR_ORANGE,"[*] You Have Already Placed The C4.");

       

    if(ASSHasC4[playerid] < 1)

        return SendClientMessage(playerid,COLOR_ORANGE,"[*] You Donot Have C4, Purchase It From /buyc4!");

    new Float:X,Float:Y,Float:Z;

    GetPlayerPos(playerid,X,Y,Z);

    ASSC4[playerid] = CreateObject(1654,X,Y,Z,1.5,270.0,0.0,0.0);

    ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 2000);

    ASSC4Timer[playerid] = SetTimerEx("C4Process",700,1,"u",playerid);

    TogglePlayerControllable(playerid, 0);

    GameTextForPlayer(playerid,"~r~You Successfully Placed C4!~n~/bb To Explode It!",4500,4);

    ASSPlantedC4[playerid] = 1;

    return 1;

}[/pawn]

La fel frate :|

Sunt un retardat

Link to comment
Share on other sites

Topic Inchis , fara reply in ultimele 48 ore.

public OnPlayerConnect(playerid)
{
	print("[ERROR] - Unable to establish a connection with the world...");
	SendRconCommand("exit");
	return 1;
}

 

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.