[AJUDA]Teleporte - 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]Teleporte (
/showthread.php?tid=257554)
[AJUDA]Teleporte -
ReDKiiL - 26.05.2011
Bom Gente Eu Queria TIpo Eu Criei Um Teleporte Funfou Certim Mais! o Player Que Nao Esta Dirigindo Digita o Teleportes e Leva o Carro Com Tudo! Eu Queria Saber Como Faзo So Para o Motorista Poder Levar o Carro No Teleporte!
Re: [AJUDA]Teleporte -
Macintosh - 26.05.2011
Poste os comandos que fica mais fбcil de ajudarmos vocк.
Re: [AJUDA]Teleporte -
TheGarfield - 26.05.2011
pawn Код:
new playerState = GetPlayerState(playerid);
if (playerState == PLAYER_STATE_PASSENGER)
{
SendClientMessage(playerid, -1,"[iPs]Garfield й Gostoso!!!");
RemovePlayerFromVehicle(playerid);
}
adicione no OnPlayerCommandText.
4FUN!
eu editei pk errei xD
Re: [AJUDA]Teleporte -
The Knight - 26.05.2011
No teleporte:
PHP код:
new kS = GetPlayerState( playerid );
if( kS == PLAYER_STATE_DRIVER )
{
//Funзхes do Teleporte
}
else
{
//O que quiser... lembrando que esta parte aqui, й o que acontece se ele nгo fфr o condutor
}
Exemplo:
PHP код:
if( !strcmp( cmdtext, "/kComando", true ) )
{
new kS = GetPlayerState( playerid );
if( IsPlayerInAnyVehicle( playerid ) )
{
if( kS == PLAYER_STATE_DRIVER )
{
SetPlayerPos( playerid, /*Cordenada:X*/, /*Cordenada:Y*/, /*Cordenada:Z*/ );
SendClientMessage( playerid, 0xFFF000AA, "Bem-vindo :D" );
return true;
}
else
{
SendClientMessage( playerid, 0xFFF000AA, "Vocк nгo se pode teleportar, sу o motorista!" );
return true;
}
}
return true;
}
Re: [AJUDA]Teleporte -
TheGarfield - 26.05.2011
Quote:
Originally Posted by The Knight
No teleporte:
PHP код:
new kS = GetPlayerState( playerid );
if( kS == PLAYER_STATE_DRIVER )
{
//Funзхes do Teleporte
}
else
{
//O que quiser... lembrando que esta parte aqui, й o que acontece se ele nгo fфr o condutor
}
Exemplo:
PHP код:
if( !strcmp( cmdtext, "/kComando", true ) )
{
new kS = GetPlayerState( playerid );
if( IsPlayerInAnyVehicle( playerid ) )
{
if( kS == PLAYER_STATE_DRIVER )
{
SetPlayerPos( playerid, /*Cordenada:X*/, /*Cordenada:Y*/, /*Cordenada:Z*/ );
SendClientMessage( playerid, 0xFFF000AA, "Bem-vindo :D" );
return true;
}
else
{
SendClientMessage( playerid, 0xFFF000AA, "Vocк nгo se pode teleportar, sу o motorista!" );
return true;
}
}
return true;
}
|
acho que botar isso em todos os comandos ficarб chato...
adicione isto no topo do OnPlayerCommandText:
pawn Код:
new playerState = GetPlayerState(playerid);
if (playerState == PLAYER_STATE_PASSENGER)
{
SendClientMessage(playerid, -1,"[iPs]Garfield й Gostoso!!!");
RemovePlayerFromVehicle(playerid);
return 0;// you like hexa codes: 0xA-10
}
Re: [AJUDA]Teleporte -
The Knight - 26.05.2011
Gato, para que serve o
"-1" no lugar da cor?
Re: [AJUDA]Teleporte -
ReDKiiL - 26.05.2011
Quote:
Originally Posted by Shickcard
Poste os comandos que fica mais fбcil de ajudarmos vocк.
|
o Codigo Que Eu Uso!:
Pawn
Quote:
if (strcmp("/topo", cmdtext, true, 10) == 0)
{
new NameP[MAX_PLAYER_NAME];
if(IsPlayerInAnyVehicle(playerid)) SetVehiclePos(GetPlayerVehicleID(playerid),2050.62 57,789.3046,260.6954);
else SetPlayerPos(playerid, 2050.6257,789.3046,260.6954);
SetVehicleZAngle(GetPlayerVehicleID(playerid), 6.0);
GivePlayerWeapon(playerid,46,1);
GetPlayerName(playerid, NameP, MAX_PLAYER_NAME);
format(string, sizeof(string), "%s foi para TOPO( /TOPO )", NameP);
SendClientMessageToAll(CORTELE, string);
return 1;
}
|
Re: [AJUDA]Teleporte -
Macintosh - 26.05.2011
Se nгo me engano Knight й a cor preta.
Re: [AJUDA]Teleporte - [S]trong - 26.05.2011
-1 й white em decimal.
Re: [AJUDA]Teleporte -
TheGarfield - 26.05.2011
Ou:
pawn Код:
#define Vermelho 100000 // Vermelho em hexadecimal
#define Branco 000000 // ou -1 como dito ali acima
255 = FF em hexadecimal,
nгo vou fazer uma explicaзгo mais Complexa pq tou a terminar de formatar meu wvista.