Editveh for car positioning help needed
#1

This is the whole cmd but i recive these errors and i could use your help guys :/ Using a_vehicles.inc
PHP код:
E:\Linux no SUNC\gamemodes\HTLS-RP.pwn(5471) : error 017undefined symbol "EditVehiclePos"
E:\Linux no SUNC\gamemodes\HTLS-RP.pwn(27131) : warning 235: public function lacks forward declaration (symbol "OnPlayerEditVehicle")
E:\Linux no SUNC\gamemodes\HTLS-RP.pwn(27133) : warning 219local variable "vehicleid" shadows a variable at a preceding level
E
:\Linux no SUNC\gamemodes\HTLS-RP.pwn(27134) : error 017undefined symbol "idx"
E:\Linux no SUNC\gamemodes\HTLS-RP.pwn(27134) : warning 215expression has no effect
E
:\Linux no SUNC\gamemodes\HTLS-RP.pwn(27142) : error 001expected token","but found "["
E:\Linux no SUNC\gamemodes\HTLS-RP.pwn(27142) : error 029invalid expressionassumed zero
E
:\Linux no SUNC\gamemodes\HTLS-RP.pwn(27142) : warning 215expression has no effect
E
:\Linux no SUNC\gamemodes\HTLS-RP.pwn(27142) : error 001expected token";"but found "]"
E:\Linux no SUNC\gamemodes\HTLS-RP.pwn(27142) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
6 Errors

PHP код:
new vEdit[MAX_PLAYERS];
new 
vEditID[MAX_PLAYERS];
new 
Float:vPos[MAX_PLAYERS];
new 
Float:vRot[MAX_PLAYERS];
new 
oldvID;
new 
Float:oldvdXFloat:oldvdYFloat:oldvdZFloat:oldvdRXFloat:oldvdRYFloat:oldvdRZ
PHP код:
vEdit[playerid] = 0vEditID[playerid] = 0
PHP код:
CMD:editveh(playeridparams[])
{
    new 
vehicleid GetPlayerVehicleID(playerid);
    new 
string[128], idx;
    if(!
IsPlayerLoggedIn(playerid)) return SendClientMessage(playeridCOLOR_GREY"You need to login first before using any command.");
    if(
PlayerInfo[playerid][pMapper] < 1) return SendClientMessage(playeridCOLOR_GREY"You are not authorized to use this command.");
    if(!
mDuty[playerid]) return SendClientMessage(playeridCOLOR_GREY"You are not on Mapper Duty.");
    if(
sscanf(params"i"idx)) return SendClientMessage(playeridCOLOR_WHITE"[Usage]: /editveh [vehicleid]");
    if(!
vvvehInfo[idx][vvvModel]) return SendClientMessage(playeridCOLOR_GREY"Invalid vehicle id.");
    
vEdit[playerid] = 1;
    
vEditID[playerid] = idx;
    
SetVehiclePos(vehicleidvPos[0], vPos[1], vPos[2]);
    
SetVehicleZAngle(vehicleidvRot[2]);
5471    EditVehiclePos(playeridvvvehInfo[idx][vvveh]);
    
format(stringsizeof(string), " You are now editing vehicle ID %d's position."idx);
    
SendClientMessage(playeridCOLOR_WHITEstring);
    
format(stringsizeof(string), "MapperWarn: %s is editting vehicle ID %d's position.)"RPN(playerid), idx);
    
SendMapperMessage(COLOR_GREEN1string);
    return 
1;

PHP код:
27131 public OnPlayerEditVehicle(playeridvehicleidresponseFloat:xFloat:yFloat:zFloat:rxFloat:ryFloat:rz)
{
27134   new vehicleid GetPlayerVehicleID(playerid);
27135  idx vEditID[playerid];
    if(
response == EDIT_RESPONSE_UPDATE)
    {
        
SetVehiclePos(vehicleidxyz);
        
SetVehicleZAngle(vehicleidrz);
    }
    else if(
response == EDIT_RESPONSE_CANCEL)
    {
27143        SetVehiclePos(vehicleidvPos[playerid][0], vPos[playerid][1], vPos[playerid][2]);
        
SetVehicleZAngle(vehicleidvRot[playerid][2]);
        
vPos[playerid][0] = 0vPos[playerid][1] = 0vPos[playerid][2] = 0;
        
vRot[playerid][2] = 0;
        
format(stringsizeof(string), " You have canceled editing vehicle ID %d."idx);
        
SendClientMessage(playeridCOLOR_WHITEstring);
    }
    else if(
response == EDIT_RESPONSE_FINAL)
    {
        
SetVehiclePos(vehicleidxyz);
        
SetVehicleZAngle(vehicleidrz);
        if(
vEdit[playerid] == 1)
        {
            
oldvID vvvehInfo[idx][vvvModel];
            
vvvehInfo[idx][vX] = x;
            
vvvehInfo[idx][vY] = y;
            
vvvehInfo[idx][vZ] = z;
            
vvvehInfo[idx][vRX] = rx;
            
vvvehInfo[idx][vRY] = ry;
            
vvvehInfo[idx][vRZ] = rz;
              
oldvdX vvvehInfo[idx][vX];
              
oldvdY vvvehInfo[idx][vY];
              
oldvdZ vvvehInfo[idx][vZ];
              
oldvdRX vvvehInfo[idx][vRX];
              
oldvdRY vvvehInfo[idx][vRY];
              
oldvdRZ vvvehInfo[idx][vRZ];
            
vEdit[playerid] = 0;
            
vEditID[playerid] = 0;
            
format(stringsizeof(string), " You have finished editing vehicle ID %d's position."idx);
            
SendClientMessage(playeridCOLOR_WHITEstring);
        }
    }
    return 
1
  

Reply


Messages In This Thread
Editveh for car positioning help needed - by weedxd - 03.10.2014, 10:39
Re: Editveh for car positioning help needed - by Ox1gEN - 03.10.2014, 10:49

Forum Jump:


Users browsing this thread: 1 Guest(s)