[Ajuda] OnPlayerKeyStateChange
#1

Erros

PHP код:
C:\Users\SnowBorn\Desktop\Brasil Nova Vida dlз de gm\gamemodes\GMNRV.pwn(40358) : error 017: undefined symbol "newstate"
C:\Users\SnowBorn\Desktop\Brasil Nova Vida dlз de gm\gamemodes\GMNRV.pwn(40366) : error 021: symbol already defined: "OnPlayerKeyStateChange" 
Linhas do erros
Mandei a public pq vai q da mais erros dps '-'


PHP код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(
newkeys == KEY_YES && IsPlayerInAnyVehicle(playerid))
    {
        new 
engine, lights, alarm, doors, bonnet, boot, objective;
        if(
luz[playerid] == 0)
        {
            new 
veh = GetPlayerVehicleID(playerid);
            
GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
            
SetVehicleParamsEx(veh, engine, VEHICLE_PARAMS_ON, alarm, doors, bonnet, boot, objective);
            
luz[playerid] = 1;
            
SendClientMessage(playerid, Verde, "Farol ligado");
        }
        else if(
luz[playerid] == 1)
        {
            new 
veh = GetPlayerVehicleID(playerid);
            
GetVehicleParamsEx(veh, engine, lights, alarm,doors, bonnet, boot, objective);
            
SetVehicleParamsEx(veh, engine, VEHICLE_PARAMS_OFF, alarm, doors, bonnet, boot, objective);
            
luz[playerid] = 0;
            
SendClientMessage(playerid, Laranja, "Farol Desligado");
        }
    }
    if(
newkeys == KEY_SUBMISSION && IsPlayerInAnyVehicle(playerid))
    {
        new 
mot, lu, alar, por, cap, porma, ob;
        new 
carro = GetPlayerVehicleID(playerid);
        
GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob);
        if(
mot == VEHICLE_PARAMS_OFF)
        {
            
SetVehicleParamsEx(carro, VEHICLE_PARAMS_ON, lu, alar, por, cap, porma, ob);
            
SendClientMessage(playerid, Verde, "Motor ligado");
            }else{
            
SendClientMessage(playerid,Laranja, "Motor Desligado");
            
SetVehicleParamsEx(carro, VEHICLE_PARAMS_OFF, lu, alar, por, cap, porma, ob);
        }
}
if(
newkeys == KEY_WALK)
    {
        if(
Patins_M[playerid] > 2)  ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0);
        
PlayerPlaySound(playerid, 2145, 0, 0, 0);
        return 
true;
    }
    if(
newkeys == KEY_SPRINT)
    {
        if(
Patins_M[playerid] > 2)
        {
            if(
Patins_M[playerid] == 3) ApplyAnimation(playerid,"SKATE","skate_run",4.0,1,1,1,1,500);
            else if(
Patins_M[playerid] == 4) ApplyAnimation(playerid,"SKATE","skate_sprint",4.0,1,1,1,1,500);
            
PlayerPlaySound(playerid, 2145, 0, 0, 0);
        }
        return 
true;
    }
    if(
HOLDING(KEY_FIRE) && Servico[playerid] == true)
    {
        
SetTimerEx("Check", 750, false, "i", playerid);
        
Apagando[playerid] = 1;
    }
    if(
RELEASED(KEY_FIRE))
    {
        
Apagando[playerid] = 0;
    }
    new 
pname[MAX_PLAYER_NAME];
    
GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
    if(
pAdmin[playerid] == 5 || PlayerInfo[playerid][OrganizadorE]){
    {
    if( 
ClickMause[ playerid ] == 1 )
    {
    if ( 
newkeys & KEY_FIRE )
    {
    if( 
CheckID >= 1000 )
    {
     
SendClientMessage( playerid, Vermelho, " | ERRO | Jб foi criado o mбximo de checkpoints ! ( Mбximo: 500 )" );
      return 
1;
       }
      new
    
Float:g_x, Float:g_y, Float:g_z
    
;
     
GetPlayerPos( playerid, g_x, g_y, g_z );
    
CheckPoint[ CheckID ][ 0 ] = g_x;
    
CheckPoint[ CheckID ][ 1 ] = g_y;
    
CheckPoint[ CheckID ][ 2 ] = g_z;
    
CheckID ++;
    
format( gStr, sizeof( gStr ), "~b~~h~~n~~n~~n~~n~~n~~n~CheckPoint %d criado !", CheckID );
    
GameTextForPlayer( playerid, gStr, 5000, 5 );
     }
      }
    }
    }
    if(
PlayerInfo[playerid][pVip2] == 1 || IsPlayerAdmin(playerid))
    {
        if(
IsPlayerInAnyVehicle(playerid))
        {
            new 
var0 = GetPlayerVehicleID(playerid);
            if(
function218(var0) && (oldkeys & 1 || oldkeys & 4))
            {
                
RemoveVehicleComponent(var0, 1010);
                
AddVehicleComponent(var0, 1010);
            }
        }
    }
    if(
IsNearOfBallon(playerid))
    {
    if(
newkeys & KEY_SECONDARY_ATTACK && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
    {
    if(
Ballon[playerid][bPaused])
    {
    
SetPlayerArmedWeapon(playerid, 0);
    
SetPlayerAttachedObject(playerid, GetEmptyAttachedSlot(playerid), 19087, 6, 0.490910, -0.251698, 1.521623, 11.095133, 14.952476, 349.793426, 0.684850, 0.684850, 0.684850);
    
ApplyAnimation(playerid, "POOL", "POOL_Idle_Stance", 4.1, 1, 1, 1, 1, 1);
    
Ballon[playerid][bTimer] = SetTimerEx("CheckPlayerKeys", 500, true, "d", playerid);
    
Ballon[playerid][bPaused] = false;
    
Ballon[playerid][bCameraDistance] = 80.0;
    return 
true;
    }
    else
    {
    
StopObject(Ballon[playerid][bObjectID]);
    
ClearAnimations(playerid);
    
SetCameraBehindPlayer(playerid);
    
RemovePlayerAttachedObject(playerid, Ballon[playerid][oAttachedSlot]);
    
KillTimer(Ballon[playerid][bTimer]);
    
Ballon[playerid][bTimer] = -1;
    
Ballon[playerid][bPaused] = true;
    return 
true;
    }
    }
    if(
newkeys & KEY_CROUCH) SetSlowSpeed(playerid);
    if(!
Ballon[playerid][bPaused])
     {
      
CheckPlayerKeys(playerid);
       
UpdateCamera(playerid);
    }
    }
    if((
newkeys & KEY_CROUCH) && (IsPlayerInAnyVehicle(playerid)))
    {
    if(
PlayerInfo[ playerid ][pAbriu] == 1 ){
    return 
1;
    }
    new 
string [ 128 ];
    if(
IsPlayerInRangeOfPoint(playerid, 15.0, 926.1042,-1220.0074,16.9675)) {
     
format(pFile, sizeof(pFile), "clas/%s.ini", PlayerName(playerid));
     
format(gFile, sizeof(gFile), "clas/%s.ini", dini_Get(pFile, "cla"));
      
format(string, sizeof(string),"/Base/base0.ini", dini_Get(pFile, "Base"));
     if(
strcmp(dini_Get(pFile, "cla"), "Nenhum", true) == 0) {
     return 
1;
     }
    if (
PlayerInfo[ playerid ][pAbriu] == 1){
    return 
1;
    }
    if(
strcmp(dini_Get(string, "Dono"), dini_Get(pFile, "cla"), true) == 0) {
    
MoveObject(gz1,923.64489746094, -1225.5694580078, 18.749954223633,3.0);
     
PlayerInfo[ playerid ][pAbriu] = 1;
    
SetTimerEx("FecharLs", 5000, false, "i", playerid);
    
format(string, sizeof(string)," | INFO | O portгo da base do clan %s localizada em Los Santos foi aberto!", dini_Get(pFile, "cla"));
    
SendClientMessage(playerid,AmareloClaro, string);
     }
    return 
1;
     }
    }
    if((
newkeys & KEY_CROUCH) && (IsPlayerInAnyVehicle(playerid)))
    {
    if(
PlayerInfo[ playerid ][pAbriu] == 1 ){
    return 
1;
    }
    new 
string [ 128 ];
    if(
IsPlayerInRangeOfPoint(playerid, 15.0, 369.89999389648,-1930.4000244141,7.6999998092651)) {
     
format(pFile, sizeof(pFile), "clas/%s.ini", PlayerName(playerid));
     
format(gFile, sizeof(gFile), "clas/%s.ini", dini_Get(pFile, "cla"));
      
format(string, sizeof(string),"/Base/base3.ini", dini_Get(pFile, "Base"));
     if(
strcmp(dini_Get(pFile, "cla"), "Nenhum", true) == 0) {
     return 
1;
     }
    if (
PlayerInfo[ playerid ][pAbriu] == 1){
    return 
1;
    }
    if(
strcmp(dini_Get(string, "Dono"), dini_Get(pFile, "cla"), true) == 0) {
    
MoveObject(gz4,370.20001220703, -1931.5, 14.60000038147,3.0);
     
PlayerInfo[ playerid ][pAbriu] = 1;
    
SetTimerEx("FecharLs2", 5000, false, "i", playerid);
    
format(string, sizeof(string)," | INFO | O portгo da base do clan %s localizada em Los Santos foi aberto!", dini_Get(pFile, "cla"));
    
SendClientMessage(playerid,AmareloClaro, string);
     }
    return 
1;
     }
    }
    if((
newkeys & KEY_CROUCH) && (IsPlayerInAnyVehicle(playerid)))
    {
    new 
string [ 128 ];
     if(
IsPlayerInRangeOfPoint(playerid, 15.0, 1067.2876,1361.5778,10.6719)) {
     
format(pFile, sizeof(pFile), "clas/%s.ini", PlayerName(playerid));
     
format(gFile, sizeof(gFile), "clas/%s.ini", dini_Get(pFile, "cla"));
     
format(string, sizeof(string),"/Base/base2.ini", dini_Get(pFile, "Base"));
     if(
strcmp(dini_Get(pFile, "cla"), "Nenhum", true) == 0) {
     return 
1;
     }
    if (
PlayerInfo[ playerid ][pAbriu] == 1 ){
    return 
1;
    }
    if(
strcmp(dini_Get(string, "Dono"), dini_Get(pFile, "cla"), true) == 0) {
    
MoveObject(gz2,1078.4520263672, 1357.8900146484, 12.593704223633,3.0);
    
PlayerInfo[ playerid ][pAbriu] = 1;
    
SetTimerEx("FecharLv", 5000, false, "i", playerid);
    
format(string, sizeof(string)," | INFO | O portгo da base do clan %s localizada em Las Venturas foi aberto!", dini_Get(pFile, "cla"));
    
SendClientMessage(playerid,AmareloClaro, string);
       }
    return 
1;
     }
     }
    if((
newkeys & KEY_CROUCH) && (IsPlayerInAnyVehicle(playerid)))
    {
    new 
string [ 128 ];
     if(
IsPlayerInRangeOfPoint(playerid, 15.0, -2127.1000976563,-79.40000152587,35.299999237061)) {
     
format(pFile, sizeof(pFile), "clas/%s.ini", PlayerName(playerid));
     
format(gFile, sizeof(gFile), "clas/%s.ini", dini_Get(pFile, "cla"));
     
format(string, sizeof(string),"/Base/base1.ini", dini_Get(pFile, "Base"));
     if(
strcmp(dini_Get(pFile, "cla"), "Nenhum", true) == 0) {
     return 
1;
     }
    if (
PlayerInfo[ playerid ][pAbriu] == 1 ){
    return 
1;
    }
    if(
strcmp(dini_Get(string, "Dono"), dini_Get(pFile, "cla"), true) == 0) {
    
MoveObject(gz3,-2116.5, -80.599998474121, 37.099998474121,3.0);
     
PlayerInfo[ playerid ][pAbriu] = true;
    
SetTimerEx("FecharBASE51", 5000, false, "i", playerid);
    
format(string, sizeof(string)," | INFO | O portгo da base do clan %s localizada em San Fierro foi aberto !", dini_Get(pFile, "cla"));
    
SendClientMessage(playerid,AmareloClaro, string);
       }
    return 
1;
     }
     }
 
/* if((newkeys & KEY_CROUCH) && (IsPlayerInAnyVehicle(playerid)))
    {
        new string [ 128 ];
         if(IsPlayerInRangeOfPoint(playerid, 15.0,836.445,-2065.518,14.641))
        {
            if (PlayerInfo[ playerid ][pAbriu] == 1)
            {
                return 1;
            }
            MoveObject(portao1c,836.445,-2065.518,19.641, 2.0);
            PlayerInfo[ playerid ][pAbriu] = true;
            SetTimerEx("FecharPORTAOILHA", 5000, false, "i", playerid);
            format(string, sizeof(string)," | INFO | O portгo da Ilha Foi Aberto !");
            SendClientMessage(playerid,Azul, string);
          }
        return 1;
    }
 */
     
if((newkeys & KEY_LEFT) && (IsPlayerInAnyVehicle(playerid)))
    {
        new 
string [ 128 ];
         if(
IsPlayerInRangeOfPoint(playerid, 15.0, -1039.1999511719,-587.70001220703,33.799999237061))
        {
            if(
PlayerInfo[playerid][pGOETraficante] || PlayerInfo[playerid][pGOETerrorista] || PlayerInfo[playerid][pGOEAssassino]  || PlayerInfo[playerid][pGOELadrao]  || PlayerInfo[playerid][pGOEDono]|| IsPlayerAdmin(playerid))
            {
                
MoveObject(PortaoGOE,-1039.1999511719,-587.70001220703,28,2.0);
                
SetTimerEx("PortaoGOE1", 5000, false, "i", playerid);
                
format(string, sizeof(string)," | INFO | O portгo da GOE Foi Aberto !");
                
SendClientMessage(playerid,CorGOE, string);
              }
            return 
1;
         }
    }
    if((
newkeys & KEY_LEFT) && (IsPlayerInAnyVehicle(playerid)))
    {
        new 
string [ 128 ];
         if(
IsPlayerInRangeOfPoint(playerid, 15.0, -1567.9055,662.2169,6.7592))
        {
           if(
PlayerInfo[playerid][pCorregedor] >= 1 || PlayerInfo[playerid][pbOrecruta] || PlayerInfo[playerid][pbOsargento] || PlayerInfo[playerid][pbOaspirante] || PlayerInfo[playerid][pbOtenente] || PlayerInfo[playerid][pbOcapitao] || PlayerInfo[playerid][pbOmajor] || PlayerInfo[playerid][pbOcoronel] ||
           
PlayerInfo[playerid][pbOgeneral] || IsPlayerAdmin(playerid))
            {
                
SetObjectRot(abc1,0, 0, 272);
                
SetTimerEx("PortaoABC", 5000, false, "i", playerid);
                
format(string, sizeof(string)," | INFO | A cancela  Foi Aberta !");
                
SendClientMessage(playerid,CorBOPE, string);
              }
            return 
1;
         }
    }
     if((
newkeys & KEY_LEFT) && (IsPlayerInAnyVehicle(playerid)))
    {
        new 
string [ 128 ];
         if(
IsPlayerInRangeOfPoint(playerid, 15.0, -1705.5439,683.7820,24.4590))
        {
            if(
PlayerInfo[playerid][pCorregedor] >= 1 || PlayerInfo[playerid][pbOrecruta] || PlayerInfo[playerid][pbOsargento] || PlayerInfo[playerid][pbOaspirante] || PlayerInfo[playerid][pbOtenente] || PlayerInfo[playerid][pbOcapitao] || PlayerInfo[playerid][pbOmajor] || PlayerInfo[playerid][pbOcoronel] ||
            
PlayerInfo[playerid][pbOgeneral] || IsPlayerAdmin(playerid))
            {
                
SetObjectRot(abc2,0, 0, 272);
                
SetTimerEx("PortaoABC2", 5000, false, "i", playerid);
                
format(string, sizeof(string)," | INFO | A Segunda cancela  Foi Aberta !"); // SetObjectRot(abc1,0, 0, 272);
                
SendClientMessage(playerid,CorBOPE, string);
              }
            return 
1;
         }
    }
     if((
newkeys & KEY_LEFT) && (IsPlayerInAnyVehicle(playerid)))
    {
        new 
string [ 128 ];
         if(
IsPlayerInRangeOfPoint(playerid, 15.0, -1527.8000488281,482.5,3.09999990463263))
        {
            if(
PlayerInfo[playerid][piRrecruta] || PlayerInfo[playerid][piRladrao] || PlayerInfo[playerid][piRassassino] || PlayerInfo[playerid][piRassassinoP] || PlayerInfo[playerid][piRtraficante] || PlayerInfo[playerid][piRterrorista] || PlayerInfo[playerid][piRsubdono] || PlayerInfo[playerid][piRdono] || IsPlayerAdmin(playerid))
            {
                
MoveObject(PortaoIRQ,-1527.8000488281,482.5,3.09999990463263,2.0);
                
SetTimerEx("PortaoIRQ1", 5000, false, "i", playerid);
                
format(string, sizeof(string)," | INFO | O portгo da PCC Foi Aberto !");
                
SendClientMessage(playerid,Vermelho, string);
              }
            return 
1;
         }
    }
    if((
newkeys & KEY_LEFT) && (IsPlayerInAnyVehicle(playerid)))
    {
        new 
string [ 128 ];
         if(
IsPlayerInRangeOfPoint(playerid, 15.0, 135.2, 1940.5, 21.1))
        {
         if(
PlayerInfo[playerid][pFECrecruta] || PlayerInfo[playerid][pFECladrao] || PlayerInfo[playerid][pFECassassino] || PlayerInfo[playerid][pFECassassinoP] || PlayerInfo[playerid][pFECtraficante] || PlayerInfo[playerid][pFECterrorista] || PlayerInfo[playerid][pFECsubdono] || PlayerInfo[playerid][pFECdono] || IsPlayerAdmin(playerid))
            {
                
MoveObject(PortaoFEC,135.19999694824,1940.5,15.60000038147,2.0);
                
SetTimerEx("PortaoFEC1", 5000, false, "i", playerid);
                
format(string, sizeof(string)," | INFO | O portгo da FEC Foi Aberto !");
                
SendClientMessage(playerid,FEC, string);
              }
            return 
1;
         }
    }
/*    if((newkeys & KEY_LEFT) && (IsPlayerInAnyVehicle(playerid)))
    {
        new string [ 128 ];
         if(IsPlayerInRangeOfPoint(playerid, 15.0, 1430.69, -1741.17, 15.10))
        {
             if(PlayerInfo[playerid][pbOrecruta] || PlayerInfo[playerid][pbOsargento] || PlayerInfo[playerid][pbOaspirante] || PlayerInfo[playerid][pbOtenente] || PlayerInfo[playerid][pbOcapitao] || PlayerInfo[playerid][pbOmajor] || PlayerInfo[playerid][pbOcoronel] || PlayerInfo[playerid][pbOgeneral] || IsPlayerAdmin(playerid))
            {
                MoveObject(PortaoB,1430.69, -1741.17, 5.1000,2.0);
                SetTimerEx("PortaoB1", 5000, false, "i", playerid);
                format(string, sizeof(string)," | INFO | O portгo da BOPE Foi Aberto !");
                SendClientMessage(playerid,CorBOPE, string);
              }
            return 1;
         }
    } */
      
if((newkeys & KEY_LEFT) && (IsPlayerInAnyVehicle(playerid)))
    {
        new 
string [ 128 ];
         if(
IsPlayerInRangeOfPoint(playerid, 15.0, -83.800003051758, -352.89999389648, 3.2000000476837))
        {
            if(
PlayerInfo[playerid][pAL] == 1 || PlayerInfo[playerid][pAL] == 2 || PlayerInfo[playerid][pAL] == 3 || PlayerInfo[playerid][pAL] == 4 || PlayerInfo[playerid][pAL] == 5 || PlayerInfo[playerid][pAL] == 6 || PlayerInfo[playerid][pAL] == 7 || PlayerInfo[playerid][pAL] == 8 || IsPlayerAdmin(playerid))
            {
                
MoveObject(portaoAL,-83.800003051758, -352.89999389648, 8.6000003814697,2.0);
                
SetTimerEx("FecharBASEAL", 5000, false, "i", playerid);
                
format(string, sizeof(string)," | INFO | O portгo da aL Foi Aberto !");
                
SendClientMessage(playerid,Vermelho, string);
              }
            return 
1;
         }
    }
    if((
newkeys & KEY_LEFT) && (IsPlayerInAnyVehicle(playerid)))
    {
        new 
string [128];
         if(
IsPlayerInRangeOfPoint(playerid, 15.0, 1588.0791015625, -1638.140625, 15.172611236572))
         {
            if(
PlayerInfo[playerid][pBTE] == 1 || PlayerInfo[playerid][pBTE] == 2 || PlayerInfo[playerid][pBTE] == 3 || PlayerInfo[playerid][pBTE] == 4 || PlayerInfo[playerid][pBTE] == 5)
            {
                
MoveObject(pdp2,1598.3291015625,-1638.1206054688,15.172611236572,2.0);
                
SetTimerEx("FecharBASEBTE", 5000, false, "i", playerid);
                
format(string, sizeof(string)," | INFO | O portгo da GER Foi Aberto !");
                
SendClientMessage(playerid,AzulClaro, string);
              }
            return 
1;
         }
 }
/*    if((newkeys & KEY_CROUCH) && (IsPlayerInAnyVehicle(playerid)))
    {
        new string [ 128 ];
         if(IsPlayerInRangeOfPoint(playerid, 15.0,836.445,-2065.518,14.641))
        {
            if (PlayerInfo[ playerid ][pAbriu] == 1)
            {
                return 1;
            }
            MoveObject(portao1c,836.445,-2065.518,19.641, 2.0);
            PlayerInfo[ playerid ][pAbriu] = true;
            SetTimerEx("FecharPORTAOILHA", 5000, false, "i", playerid);
            format(string, sizeof(string)," | INFO | O portгo da Ilha Foi Aberto !");
            SendClientMessage(playerid,Azul, string);
          }
        return 1;
    }
*/
    
new string[128];
    for(new 
c = 0; c < MAX_PROP; c++)
    {
    
format(string, sizeof(string),"/Props/prop%d.ini", c);
    if(
dini_Int(string, "TInt") == 1){
    if(
newkeys==KEY_SECONDARY_ATTACK && IsPlayerInRangeOfPoint(playerid, 2.0, dini_Float(string,"PosX"), dini_Float(string,"PosY"), dini_Float(string,"PosZ")))
    {
    new 
strx2[128];
    
format(STRX, sizeof(STRX),"/Interiores/int%d.ini", dini_Int(string,"Int"));
    if(
dini_Exists(STRX)){
    
emcasa[playerid] = 1;
    new 
Float:X, Float:Y, Float:Z;
    
GetPlayerPos(playerid, X, Y, Z);
    
CasaX[playerid] = X;
    
CasaY[playerid] = Y;
    
CasaZ[playerid] = Z;
    
SetPlayerVirtualWorld(playerid, c);
    
SetPlayerInterior(playerid, dini_Int(STRX,"Int"));
    
SetPlayerPos(playerid, dini_Float(STRX,"EX"), dini_Float(STRX,"EY"), dini_Float(STRX,"EZ"));
    
format(strx2, sizeof(strx2),"| INFO | Vocк entrou na Empresa %s ID:%d para sair use [Enter]", dini_Get(string, "Nome"),c);
    
SendClientMessage(playerid, 0x8080FFFF,strx2);
    return 
1;
    }
    }
    }
    }
    if (
newkeys==KEY_SECONDARY_ATTACK && emcasa[playerid] == 1)
    {
    for(new 
c = 0; c < MAX_PROP; c++)
    {
    
emcasa[playerid] = 0;
    
SetPlayerVirtualWorld(playerid, 0);
    
SetPlayerInterior(playerid, 0);
    
SetPlayerPos(playerid, CasaX[playerid], CasaY[playerid], CasaZ[playerid]);
    
format(pf, sizeof(pf),"| INFO | Vocк Saiu da Empresa %s ", dini_Get(string, "Nome"),c);
    
SendClientMessage(playerid, 0x8080FFFF,pf);
    return 
1;
    }
    }
    if(
newkeys == KEY_SECONDARY_ATTACK)
    {
    if(
PlayerToPoint(3.0, playerid, 1154.7894,-1769.3828,16.5938)){//AgenciaLS
    
SetPlayerPos(playerid,1490.4620,1305.9231,1093.2964);
    
SetPlayerInterior(playerid, 3);
    
SetPlayerFacingAngle(playerid, 93.1800);
    
SetCameraBehindPlayer( playerid );
    
prefls[playerid] = 1;
    }
    if(
PlayerToPoint(3.0, playerid, -1492.5999755859,920.09997558594,7.1999998092651)){//AgenciaSF
    
SetPlayerPos(playerid,1490.4620,1305.9231,1093.2964);
    
SetPlayerInterior(playerid, 3);
    
SetPlayerFacingAngle(playerid, 93.1800);
    
SetCameraBehindPlayer( playerid );
    
prefsf[playerid] = 1;
    }
    if(
PlayerToPoint(3.0, playerid,  2449.3000488281,1284,11.199999809265)){//AgenciaLV
    
SetPlayerPos(playerid,1490.4620,1305.9231,1093.2964);
    
SetPlayerInterior(playerid, 3);
    
SetPlayerFacingAngle(playerid, 93.1800);
    
SetCameraBehindPlayer( playerid );
    
preflv[playerid] = 1;
    }
    if(
PlayerToPoint(3.0, playerid, -2.2727,1209.7877,19.3527)){//AgenciaFC
    
SetPlayerPos(playerid,1490.4620,1305.9231,1093.2964);
    
SetPlayerFacingAngle(playerid, 93.1800);
    
SetCameraBehindPlayer( playerid );
    
SetPlayerInterior(playerid, 3);
    }
    if(
PlayerToPoint(3.0, playerid, 1555.4916,-1675.6893,16.1953)){//DPLS
    
SetPlayerPos(playerid,246.7995,65.9249,1003.6406);
    
SetPlayerInterior(playerid,6);
    
Dplos[playerid] = 1;
    }
    if(
PlayerToPoint(3.0, playerid, 246.9346,62.4051,1003.6406)){
    
SetPlayerPos(playerid,1552.5618,-1675.5143,16.1953);
    
SetPlayerInterior(playerid,0);
    }
    if(
dentrocasa[playerid] == 0)
    {
    new 
timestamp = GetTickCount();
    if(
timestamp - inhousepickup[playerid] > 2000)
    {
    return 
1;
    } 
Reply
#2

O primeiro erro provavelmente estб ocorrendo porque vocк estб botando o cуdigo em outra callback que nгo й a OnPlayerStateChange.

Jб o segundo erro, existem duas callbacks OnPlayerKeyStateChange no seu GameMode. Pegue o que tem dentro de uma e bote dentro da outra e por fim apague a que vocк retirou as linhas de comando.

Vocк pode usar CTRL+F para buscar.

PS: Seja objetivo no tнtulo do tуpico. "Erros" nгo resume o assunto do que se trata.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)