[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:
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.