//No topo do GM
#define KEY_YES 65536
//public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
if((newkeys == KEY_YES) && (IsPlayerInAnyVehicle(playerid)))
{
if(!IsPlayerInRangeOfPoint(playerid, 7.0, 3055,-708,11)) return 1;//chamar elevador embaixo
MoveObject(elevador,3028.8000000,-704.5996000,10.5,2.0);
MoveObject(elevador2,3042.8000000,-705.5996000,10.5,2.0);
SendClientMessage(playerid,COR_RED, "[INFO] Elevador a Caminho.");
return 1;
}
C:\Users\user\Desktop\Nova pasta\SERVER\SERVIDOR1\filterscripts\SISTEMAELEVADOR.pwn(5) : warning 201: redefinition of constant/macro (symbol "KEY_YES")
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Warning.
//Linha 5:
#define KEY_YES 65536
#define PRESS(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
if(PRESS(KEY_YES))
PHP код:
PHP код:
|
C:\Users\user\Desktop\Nova pasta\SERVER\SERVIDOR1\filterscripts\ELEVADOR.pwn(475) : error 017: undefined symbol "PRESSED"
C:\Users\user\Desktop\Nova pasta\SERVER\SERVIDOR1\filterscripts\ELEVADOR.pwn(483) : error 017: undefined symbol "PRESSED"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
//linhas
475- if(PRESSED(KEY_YES))
483- if(PRESSED(KEY_YES))
#define KEY_YES 65536
#define PRESS(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
Subsitutiu
PHP код:
PHP код:
|
//Topo FS
#define PRESS(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
// public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
if(PRESSED(KEY_YES))
{
if(!IsPlayerInRangeOfPoint(playerid, 7.0, 3055,-708,11)) return 1;//chamar elevador embaixo
MoveObject(elevador,3028.8000000,-704.5996000,10.5,2.0);
MoveObject(elevador2,3042.8000000,-705.5996000,10.5,2.0);
SendClientMessage(playerid,COR_RED, "[INFO] Elevador a Caminho.");
return 1;
}
if(PRESSED(KEY_YES))
{
if(!IsPlayerInRangeOfPoint(playerid, 7.0, 3040,-712,54.90001525879)) return 1;//chamar elevador em cima
MoveObject(elevador,3028.8000000,-704.5996000,53.799999237061,2.0);
MoveObject(elevador2,3042.8000000,-705.5996000,53.799999237061,2.0);
SendClientMessage(playerid,COR_RED, "[INFO] Elevador a Caminho.");
return 1;
}
return 0;
}
#define PRESS(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
// public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
if(PRESS(KEY_YES))
{
if(!IsPlayerInRangeOfPoint(playerid, 7.0, 3055,-708,11)) return 1;//chamar elevador embaixo
MoveObject(elevador,3028.8000000,-704.5996000,10.5,2.0);
MoveObject(elevador2,3042.8000000,-705.5996000,10.5,2.0);
SendClientMessage(playerid,COR_RED, "[INFO] Elevador a Caminho.");
return 1;
}
if(PRESS(KEY_YES))
{
if(!IsPlayerInRangeOfPoint(playerid, 7.0, 3040,-712,54.90001525879)) return 1;//chamar elevador em cima
MoveObject(elevador,3028.8000000,-704.5996000,53.799999237061,2.0);
MoveObject(elevador2,3042.8000000,-705.5996000,53.799999237061,2.0);
SendClientMessage(playerid,COR_RED, "[INFO] Elevador a Caminho.");
return 1;
}
return 0;
}
Presta atenзгo nй amigo
PHP код:
|