Need Help
#1

PHP код:
C:\Users\Administrator\Desktop\123\123\gamemodes\lock.pwn(84) : error 010invalid function or declaration
C
:\Users\Administrator\Desktop\123\123\gamemodes\lock.pwn(90) : error 017undefined symbol "gPlayerLogged"
C:\Users\Administrator\Desktop\123\123\gamemodes\lock.pwn(90) : warning 215expression has no effect
C
:\Users\Administrator\Desktop\123\123\gamemodes\lock.pwn(90) : error 001expected token";"but found "]"
C:\Users\Administrator\Desktop\123\123\gamemodes\lock.pwn(90) : error 029invalid expressionassumed zero
C
:\Users\Administrator\Desktop\123\123\gamemodes\lock.pwn(90) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
5 Errors

Reply
#2

PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    if (
strcmp("/lock"cmdtexttrue10) == 0)
    {
        if(
gPlayerLogged[playerid] == 0) return SendClientMessage(playeridCOLOR_LIGHTRED"You need to login first.");
    if(
IsPlayerConnected(playerid))
    {
        new 
engine,lights,alarm,doors,bonnet,boot,objective;
        if(
SwitchKey[playerid] == 1)
        {
            new 
string[100];
             if(
personalcar[playerid] != 0)
              {
                if(
CheckPlayerDistanceToVehicle(5.0playeridpersonalcar[playerid]))
                {
                     if(
CarInfo[OwnedVeh(personalcar[playerid])][cLock] == 1)
                      {
                        
GetVehicleParamsEx(personalcar[playerid],engine,lights,alarm,doors,bonnet,boot,objective);
                          
SetVehicleParamsEx(personalcar[playerid],engine,lights,alarm,0,bonnet,boot,objective);
                        
format(stringsizeof(string), "~h~%s~n~~g~Unlocked",CarInfo[OwnedVeh(personalcar[playerid])][cDescription]);
                        
GameTextForPlayer(playeridstring40004);
                        
CarInfo[OwnedVeh(personalcar[playerid])][cLock] = 0;
                        
gCarLock[personalcar[playerid]] = 0;
                        
vUpdate(OwnedVeh(personalcar[playerid]), cLockx); //
                        
return 1;
                    }
                    else if(
CarInfo[OwnedVeh(personalcar[playerid])][cLock] == 0)
                    {
                        
GetVehicleParamsEx(personalcar[playerid],engine,lights,alarm,doors,bonnet,boot,objective);
                          
SetVehicleParamsEx(personalcar[playerid],engine,lights,alarm,1,bonnet,boot,objective);
                        
format(stringsizeof(string), "~h~%s~n~~r~Locked",CarInfo[OwnedVeh(personalcar[playerid])][cDescription]);
                        
GameTextForPlayer(playeridstring40004);
                        
CarInfo[OwnedVeh(personalcar[playerid])][cLock] = 1;
                        
gCarLock[personalcar[playerid]] = 1;
                        
vUpdate(OwnedVeh(personalcar[playerid]), cLockx); //
                        
return 1;
                    }
                }
                else return 
SendClientMessage(playeridCOLOR_WHITE"{FFB870}Your vehicle not near you.");
             }
            else return 
SendClientMessage(playeridCOLOR_WHITE"{FFB870}You don't have a vehicle.");
        }
        else if(
SwitchKey[playerid] == 2)
        {
            new 
carid,string[128];
            if(
HireCar[playerid] == -1) return SCM(playerid,COLOR_WHITE,"{FFB870}You do not have a rental car/boat/bike/scooter already.");
            if(
HireCar[playerid] != -1)
            {
                
carid HireCar[playerid];
            }
            if(
CheckPlayerDistanceToVehicle(5.0playeridHireCar[playerid]))
            {
                if(
gCarLock[carid] == 0)
                {
                    new 
vehicles GetVehicleModel(carid) - 400;
                    
format(stringsizeof(string), "~h~%s~n~~r~Locked"aVehicleNames[vehicles]);
                    
GameTextForPlayer(playeridstring40004);
                      
PlayerPlaySound(playerid11450.00.00.0);
                    
gCarLock[carid] = 1;
                    
GetVehicleParamsEx(HireCar[playerid],engine,lights,alarm,doors,bonnet,boot,objective);
                      
SetVehicleParamsEx(HireCar[playerid],engine,lights,alarm,1,bonnet,boot,objective);
                    return 
1;
                }
                else if(
gCarLock[carid] == 1)
                {
                    new 
vehicles GetVehicleModel(carid) - 400;
                    
format(stringsizeof(string), "~h~%s~n~~g~Unlocked"aVehicleNames[vehicles]);
                    
GameTextForPlayer(playeridstring40004);
                    
PlayerPlaySound(playerid11450.00.00.0);
                    
gCarLock[carid] = 0;
                    
GetVehicleParamsEx(HireCar[playerid],engine,lights,alarm,doors,bonnet,boot,objective);
                      
SetVehicleParamsEx(HireCar[playerid],engine,lights,alarm,0,bonnet,boot,objective);
                    return 
1;
                }
            }
        }
    }
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)