SA-MP Forums Archive
[Pedido] Comando - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Pedido] Comando (/showthread.php?tid=270457)



[Pedido] Comando - Tymer - 20.07.2011

Eae Galera.

Alguйm Ai Por Favor, Me Ensina, OU Me Faz O Comando /abrir, abre 1 portao, perde 100$, APARECE: Estacioamento Pago!, Com IS PLAYER RANGE OF POINT?

Ja Tentei Fazer, Mas Alguйm Ai Pode Fazer O MAIS SIMPLES POSSIVEL?


Re: [Pedido] Comando - Dark.Angel - 20.07.2011

Coloque no topo:
PHP код:
new portao
Agora vai em OnGameModeInit e coloque
PHP код:
portao CreateObject(969,2459.52050781,1963.07348633,9.99999046,0.00000000,0.00000000,0.00000000);// altere para o seu portao 
Agora vamos fazer o comando

PHP код:
if (strcmp(cmdtext,"/abrir",true) == 0)
{
    if (
IsPlayerInRangeOfPoint(playerid,12.0,2459.52050781,1963.07348633,9.99999046))
/* 12.0 = raio que player vai ter que estar ....  2459.52050781.... = cordenadas do portao fechado (alterar)*/
    
{
         
MoveObject(portao,2450.5205078125,1963.07348633,9.99999046,0.7);
/* Alterar para as cordenadas do portao aberto.... 0.7 й a velocidade que vai se mover*/
         
GivePlayerMoney(playerid,-100);
        
SendClientMessage(playerid,-1,"Estacionamento pago");
     }
     else 
SendClientMessage(playerid,-1,"Vocк esta muito distante para usar este comando");
    return 
true;

Nгo testei...


Re: [Pedido] Comando - Tymer - 20.07.2011

Bom, Ainda Nгo Testei Tmb, Mas Pode Mudar O SendClientMessage Para GAMETEXT?


Re: [Pedido] Comando - Dark.Angel - 20.07.2011

Pode *.*


Re: [Pedido] Comando - Tymer - 20.07.2011

Entao faz ai EDIT pf e muda


Re: [Pedido] Comando - Falcon. - 20.07.2011

pawn Код:
if (strcmp(cmdtext,"/abrir",true) == 0)
{
    if (IsPlayerInRangeOfPoint(playerid,12.0,2459.52050781,1963.07348633,9.99999046))
/* 12.0 = raio que player vai ter que estar ....  2459.52050781.... = cordenadas do portao fechado (alterar)*/
    {
         MoveObject(portao,2450.5205078125,1963.07348633,9.99999046,0.7);
/* Alterar para as cordenadas do portao aberto.... 0.7 й a velocidade que vai se mover*/
         GivePlayerMoney(playerid,-100);
        GameTextForPlayer(playerid, "~w~Estacionamento ~g~pago", 3000, 0);
     }
     else GameTextForPlayer(playerid, "~r~Vocк esta muito distante~n~para usar este comando", 3000, 0);
    return true;
}
Atenciosamente,
Falcon.


Re: [Pedido] Comando - Shadoww5 - 20.07.2011

Quote:
Originally Posted by Tymer
Посмотреть сообщение
Entao faz ai EDIT pf e muda
Tenta aprender sozinho, tambйm:

https://sampwiki.blast.hk/wiki/GameTextForPlayer
https://sampwiki.blast.hk/wiki/GameTextStyle


Re: [Pedido] Comando - Tymer - 20.07.2011

Vlw Ai Falcon, Vlw Dark, E Vlw Shadow, JaJa Vou Ler Isso.