public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
{
if(newkeys == 16 && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) // Se o manolo tiver fora de um veнculo e apertar F
{
OnPlayerCommandText(playerid,"/entrar");
OnPlayerCommandText(playerid,"/sair");
}
return 1;
}
Bom tem um public +- desse jeito, quando o cara chega em cima da pickup da casa apareec a msg com a info dela...e aquele negocio de /entrar...ai soh acrescentar aperta F...
Dai to meio em duvida se й isso que vocК quer ou se й aquela msg em roxo que apareec em cima da pickup...
Normalmente alguns GM ja vem com essa possibilidade de aperta F ou Enter e entrar na casa...vocк ja tentou comprar uam e entrar e sair apertando F??
public CustomPickups()
{
new Float:oldposx, Float:oldposy, Float:oldposz;
new string[128];
NameTimerGM();
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
GetPlayerPos(i, oldposx, oldposy, oldposz);
if(oldposx!=0.0 && oldposy!=0.0 && oldposz!=0.0)
{
for(new h = 0; h < sizeof(SBizzInfo); h++)
{
if(PlayerToPoint(2.0, i, SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ]))
{
if(SBizzInfo[h][sbOwned] == 1)
{
format(string, sizeof(string), "~w~%s~w~~n~Dono: %s~n~Extorcao: %s~n~Entrada: ~g~R$%d ~w~Level : %d ~n~Digite /entrar ou Aperte [F]",SBizzInfo[h][sbMessage],SBizzInfo[h][sbOwner],SBizzInfo[h][sbExtortion],SBizzInfo[h][sbEntranceCost],SBizzInfo[h][sbLevelNeeded]); // nessa linah que adiciona a msg...
}
|
proucurar e muito bom cara
pawn Код:
|
OnPlayerCommandText(playerid,"/entrar");
OnPlayerCommandText(playerid,"/sair");