SA-MP Forums Archive
[AJUDA]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: [AJUDA]Comando (/showthread.php?tid=170756)



[AJUDA]Comando - Sam.dK - 24.08.2010

Bom jah tentei aruma eu mesmo mais nao consegui :/
tipo assim eu usso esse comando para desvirar o carro!


if (strcmp("/x", cmdtext, true, 10) == 0) {
if (IsPlayerInAnyVehicle(playerid)) {
new VehicleID, Float:X, Float:Y, Float:Z, Float:Angle; GetPlayerPos(playerid, X, Y, Z); VehicleID = GetPlayerVehicleID(playerid);
GetVehicleZAngle(VehicleID, Angle);
SetVehiclePos(VehicleID, X, Y, Z);
SetVehicleZAngle(VehicleID, Angle);
SendClientMessage(playerid, 0x33AA33AA,"Vc desvirou seu carro");
}
else
{
SendClientMessage(playerid,0xAA3333AA,"You are not in car!");
return 1;
}}


O comando funciona mais mostra assim

Vc desvirou seu carro
SERVER: Unknown command.

como resolvo OBRIGADO PELA ATENЗГO


Respuesta: [AJUDA]Comando - ipsBruno - 24.08.2010

pawn Код:
if(strcmp("/x", cmdtext, true, 10) == 0)
{
     if (!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xAA3333AA,"You are not in car!");
     new VIDs, Float:X, Float:Y, Float:Z, Float:Angle;
     GetPlayerPos(playerid, X, Y, Z);
     new VIDs = GetPlayerVIDs(playerid);
     GetVehicleZAngle(VIDs, Angle);
     SetVehiclePos(VIDs, X, Y, Z);
     SetVehicleZAngle(VIDs, Angle);
     SendClientMessage(playerid, 0x33AA33AA,"Vc desvirou seu carro");
     return 1;
}



Re: [AJUDA]Comando - Kasura - 24.08.2010

pawn Код:
if(strcmp(cmd, "/flip", true) == 0)
{
new Float:X, Float:Y, Float:Z;
if(IsPlayerInAnyVehicle(playerid))
SetCameraBehindPlayer(playerid);
GetPlayerPos(playerid, X, Y, Z);
SetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z);
SetVehicleZAngle(GetPlayerVehicleID(playerid), 0);
return 1;
}
caso queira use o meu.... mas o do drakon ta mais completo ^^


Re: Respuesta: [AJUDA]Comando - Canabis - 24.08.2010

Quote:
Originally Posted by DraKoN
Посмотреть сообщение
pawn Код:
if(strcmp("/x", cmdtext, true, 10) == 0)
{
     if (!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xAA3333AA,"You are not in car!");
     new VIDs, Float:X, Float:Y, Float:Z, Float:Angle;
     GetPlayerPos(playerid, X, Y, Z);
     new VIDs = GetPlayerVIDs(playerid);
     GetVehicleZAngle(VIDs, Angle);
     SetVehiclePos(VIDs, X, Y, Z);
     SetVehicleZAngle(VIDs, Angle);
     SendClientMessage(playerid, 0x33AA33AA,"Vc desvirou seu carro");
     return 1;
}
esse fico melhor...
mais agora eu vou ensinar como й que se buga um comando!

pawn Код:
if(strcmp("/x", cmdtext, true, 10) == 0)
{
     if (IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xAA3333AA,"You are not in car!");
     new VIDs, Float:X, Float:Y, Float:Z, Float:Angle;
     GetPlayerPos(playerid, X, Y, Z);
     new VIDs = GetPlayerVIDs(playerid);
     GetVehicleZAngle(VIDs, Angle);
     SetVehiclePos(VIDs, X, Y, Z);
     SetVehicleZAngle(VIDs, Angle);
     SendClientMessage(playerid, 0x33AA33AA,"Vc desvirou seu carro");
     return 1;
}
bugado com sucesso


Re: [AJUDA]Comando - Kasura - 24.08.2010

nem ri O.o


Re: [AJUDA]Comando - Canabis - 24.08.2010

Quote:
Originally Posted by [GangstA]Kasura
Посмотреть сообщение
nem ri O.o
euri muito ^^


Re: [AJUDA]Comando - BiieL - 24.08.2010

nao entendis, onde vai bugar ?


Respuesta: [AJUDA]Comando - ipsBruno - 24.08.2010

@[WinG]BiieL:

pawn Код:
if (IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xAA3333AA,"You are not in car!");
Caso o Player estiver em um Veiculo o Comandos nгo funciona.
Resumindo ele fez ao contrбrio,bugando o comando..

Forma Correta:
pawn Код:
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xAA3333AA,"You are not in car!");



Re: [AJUDA]Comando - BiieL - 24.08.2010

ah, nem lembrei q devia ter o !, mas achei q o q ele tava dizendo era q ia crashar


Re: [AJUDA]Comando - Canabis - 24.08.2010

kkkk!
euri!
sem querer deixei o muleke confuso lol