[Ajuda] Local para a pessoa usar cmd
#1

Queria saber como colocar um local exato para a pessoa usar o cmd, e ao inves do CMD abrir quando apertar F ou Enter

Local: -274.4892,1880.0524,669.4497,145.4247

Codigo

Код:
////////////////////////////////////////////////////////////////////////////////
//                                      [FS]Pack De Armas                             //
////////////////////////////////////////////////////////////////////////////////
// Autor: Rapha3L                                                             //
// Versгo: 1.0                                                                //
// Ultima Modificaзгo: 16-06-2013                                             //
////////////////////////////////////////////////////////////////////////////////
// Crйditos: SA-MP Team/Wiki                                                  //
////////////////////////////////////////////////////////////////////////////////

//---[Includes]---//

#include <a_samp>
#include <zcmd>

//---[ID's Armas]---//

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
        if(dialogid == 189)
        {
                if(response)
                {
                        switch(listitem)
                        {
                                case 0:
                                {
                                        GivePlayerWeapon(playerid, 24, 500);
                                        GivePlayerWeapon(playerid, 25, 500);
                                        GivePlayerWeapon(playerid, 28, 500);
                                        GivePlayerWeapon(playerid, 34, 100);
                                }
                                case 1:
                                {
                                        GivePlayerWeapon(playerid, 23, 500);
                                        GivePlayerWeapon(playerid, 27, 500);
                                        GivePlayerWeapon(playerid, 31, 500);
                                        GivePlayerWeapon(playerid, 33, 500);
                                }
                                case 2:
                                {
                                        GivePlayerWeapon(playerid, 22, 500);
                                        GivePlayerWeapon(playerid, 26, 500);
                                        GivePlayerWeapon(playerid, 32, 500);
                                        GivePlayerWeapon(playerid, 30, 500);
                                }
                        }
                }
        }
        return 1;
}

//---[Comando + Dialog]---//

CMD:COMANDOAQUI(playerid,params[])
	{

        ResetPlayerWeapons(playerid);
        ShowPlayerDialog(playerid, 189, DIALOG_STYLE_LIST, "Pack's de Armas", "{A52A2A}Pack #1: {1E90FF}Deagle, Shotgun, Micro Uzi & Sniper\n{A52A2A}Pack #2: {1E90FF}Silenced 9mm, Combat Shotgun, M4 & Country Rifle\n{A52A2A}Pack #3: {1E90FF}9mm, Sawnoff, AK-47 & Tec-9", "Escolher", "Cancelar");
        return 1;
	}
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=259611 :P
Reply
#3

Cara malema sei limpa minha bunda, vo sabe coda... '-' nn tem como me ajudar nn?
Reply
#4

deu 8 erros
Reply
#5

Quote:

////////////////////////////////////////////////////////////////////////////////
// [FS]Pack De Armas //
////////////////////////////////////////////////////////////////////////////////
// Autor: Rapha3L //
// Versгo: 1.0 //
// Ultima Modificaзгo: 16-06-2013 //
////////////////////////////////////////////////////////////////////////////////
// Crйditos: SA-MP Team/Wiki //
////////////////////////////////////////////////////////////////////////////////

//---[Includes]---//

#include <a_samp>
#include <zcmd>

#define VERMELHO 0xFFFFFFFF
//---[ID's Armas]---//

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 189)
{
if(response)
{
switch(listitem)
{
case 0:
{
GivePlayerWeapon(playerid, 24, 500);
GivePlayerWeapon(playerid, 25, 500);
GivePlayerWeapon(playerid, 28, 500);
GivePlayerWeapon(playerid, 34, 100);
}
case 1:
{
GivePlayerWeapon(playerid, 23, 500);
GivePlayerWeapon(playerid, 27, 500);
GivePlayerWeapon(playerid, 31, 500);
GivePlayerWeapon(playerid, 33, 500);
}
case 2:
{
GivePlayerWeapon(playerid, 22, 500);
GivePlayerWeapon(playerid, 26, 500);
GivePlayerWeapon(playerid, 32, 500);
GivePlayerWeapon(playerid, 30, 500);
}
}
}
}
return 1;
}

//---[Comando + Dialog]---//

CMD:COMANDOAQUI(playerid,params[])
{
if(IsPlayerInRangeOfPoint(playerid, 1.5, -274.4892,1880.0524,669.4497 ))
{

SendClientMessage( playerid, VERMELHO, "[AVISO] MENSAGEM!" );
return 1;
}
ResetPlayerWeapons(playerid);
ShowPlayerDialog(playerid, 189, DIALOG_STYLE_LIST, "Pack's de Armas", "{A52A2A}Pack #1: {1E90FF}Deagle, Shotgun, Micro Uzi & Sniper\n{A52A2A}Pack #2: {1E90FF}Silenced 9mm, Combat Shotgun, M4 & Country Rifle\n{A52A2A}Pack #3: {1E90FF}9mm, Sawnoff, AK-47 & Tec-9", "Escolher", "Cancelar");
return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if ((newkeys==KEY_SECONDARY_ATTACK))
{
if(IsPlayerInRangeOfPoint( playerid, 1.5, -274.4892,1880.0524,669.4497))
{
SendClientMessage(playerid, VERMELHO, "[AVISO] MENSAGEM");
}
}
return true;
}

Testa ai,
Reply
#6

Pra limpa sua bundinha й fбcil, pega 4 dedos enfia no meio do cъ e roda depois lambe que vai ficar limpinho...

quanto ao seu problema й necessбrio usar IsPlayerInRangeOfPoint... seguindo desta forma...

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 1.5, -274.4892,1880.0524,669.4497 )) return SendClientMessage(playerid, -1, "Vocк nгo estб na loja de armas para utilizar este comando.");
Reply
#7

Quote:
Originally Posted by focaximubh
Посмотреть сообщение
quanto ao seu problema й necessбrio usar IsPlayerInRangeOfPoint... seguindo desta forma...

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 1.5, -274.4892,1880.0524,669.4497 )) return SendClientMessage(playerid, -1, "Vocк nгo estб na loja de armas para utilizar este comando.");
Corrigindo:

Quote:

if(!IsPlayerInRangeOfPoint(playerid, 1.5, -274.4892,1880.0524,669.4497 )) return SendClientMessage(playerid, -1, "Vocк nгo estб na loja de armas para utilizar este comando.");

Reply
#8

n0minal, o modo em que eu fiz esta correto ?
Reply
#9

Quote:
Originally Posted by Learning
Посмотреть сообщение
n0minal, o modo em que eu fiz esta correto ?
Nгo, na verdade vocк fez meio que ao contrбrio, e poderia poupar algumas coisas:

Код:
CMD:armaspack(playerid)
{
if(!IsPlayerInRangeOfPoint(playerid, 1.5, -274.4892,1880.0524,669.4497 )) return SendClientMessage(playerid, -1, "Vocк nгo estб no local correto"); ResetPlayerWeapons(playerid); ShowPlayerDialog(playerid, 189, DIALOG_STYLE_LIST, "Pack's de Armas", "{A52A2A}Pack #1: {1E90FF}Deagle, Shotgun, Micro Uzi & Sniper\n{A52A2A}Pack #2: {1E90FF}Silenced 9mm, Combat Shotgun, M4 & Country Rifle\n{A52A2A}Pack #3: {1E90FF}9mm, Sawnoff, AK-47 & Tec-9", "Escolher", "Cancelar"); return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)