#1

hello i try to do pickup to change car
codes:
PHP код:
}
    new 
PlayerPos,Derby;
    
#define MAX_PICK 300
    
enum pickInfo
{
    
Float:XFloat:YFloat:ZPickName[126],PickGives
};
new 
Pick[][pickInfo] =
{
    {
3062.4958,-1862.4958,12.2094,"[ Turisimo ]",8}, // Repair
    
{3161.1238,-1860.9666,14.6555,"[ Infirnos ]",14// NRG-500
}; 
PHP код:
stock VehChange(playeridcreatemodelbool:nitro)
{
    if(
InDerby[playerid])
    {
        new 
Float:Ve[3], Float:aPos[4], veh[MAX_PLAYERS],Float:vHealth[MAX_PLAYERS];
        if(
GetVehicleModel(GetPlayerVehicleID(playerid)) == createmodel) return 1;
        
GetVehiclePos(GetPlayerVehicleID(playerid), aPos[0], aPos[1], aPos[2]);
        
GetVehicleZAngle(GetPlayerVehicleID(playerid), aPos[3]);
        
GetVehicleVelocity(GetPlayerVehicleID(playerid), Ve[0], Ve[1], Ve[2]);
         
GetVehicleHealth(GetPlayerVehicleID(playerid),vHealth[playerid]);
        
DestroyVehicle(GetPlayerVehicleID(playerid));
        
veh[playerid] = CreateVehicle(createmodelaPos[0], aPos[1], aPos[2], aPos[3], 343460*5);
        
PutPlayerInVehicle(playeridveh[playerid], 0);
        
SetVehicleVelocity(GetPlayerVehicleID(playerid), Ve[0], Ve[1], Ve[2]);
        
SetVehicleZAngle(GetPlayerVehicleID(playerid), aPos[3]);
        
SetVehicleHealth(GetPlayerVehicleID(playerid),vHealth[playerid]);
        if(
nitro == trueAddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
    }
    return 
1;

PHP код:
new Float:zPos[MAX_PLAYERS][3];
new 
TakedPick[MAX_PLAYERS];
function 
CheckPick(playerid)
{
    
GetPlayerPos(playerid,zPos[playerid][0],zPos[playerid][1],zPos[playerid][2]);
    for(new 
ii<MAX_PICKi++)
    {
        if(
IsPlayerInRangeOfPoint(playerid,5,Pick[i][X],Pick[i][Y],Pick[i][Z]))
        {
            if(
Pick[i][PickGives] == && TakedPick[playerid] != Pick[i][PickGives]) RepairVehicle(GetPlayerVehicleID(playerid)), SetVehicleHealth(GetPlayerVehicleID(playerid),1000),TakedPick[playerid] = Pick[i][PickGives];
            if(
Pick[i][PickGives] == 2&& TakedPick[playerid] != Pick[i][PickGives]) VehChange(playerid,522,false),TakedPick[playerid] = Pick[i][PickGives];
            if(
Pick[i][PickGives] == 3&& TakedPick[playerid] != Pick[i][PickGives]) VehChange(playerid,468,false),TakedPick[playerid] = Pick[i][PickGives];
            if(
Pick[i][PickGives] == 4&& TakedPick[playerid] != Pick[i][PickGives]) VehChange(playerid,444,false),TakedPick[playerid] = Pick[i][PickGives];
            if(
Pick[i][PickGives] == 5&& TakedPick[playerid] != Pick[i][PickGives]) VehChange(playerid,464,false),TakedPick[playerid] = Pick[i][PickGives];
            if(
Pick[i][PickGives] == 6&& TakedPick[playerid] != Pick[i][PickGives]) VehChange(playerid,425,false),TakedPick[playerid] = Pick[i][PickGives];
            if(
Pick[i][PickGives] == 7&& TakedPick[playerid] != Pick[i][PickGives]) VehChange(playerid,520,false),TakedPick[playerid] = Pick[i][PickGives];
            if(
Pick[i][PickGives] == 8&& TakedPick[playerid] != Pick[i][PickGives]) VehChange(playerid,451,false),TakedPick[playerid] = Pick[i][PickGives];
            if(
Pick[i][PickGives] == 9&& TakedPick[playerid] != Pick[i][PickGives]) VehChange(playerid,481,false),TakedPick[playerid] = Pick[i][PickGives];
            if(
Pick[i][PickGives] == 10 && TakedPick[playerid] != Pick[i][PickGives]) RepairVehicle(GetPlayerVehicleID(playerid)), SetVehicleHealth(GetPlayerVehicleID(playerid),1000),AddVehicleComponent(GetPlayerVehicleID(playerid), 1010),TakedPick[playerid] = Pick[i][PickGives];
            if(
Pick[i][PickGives] == 11 && TakedPick[playerid] != Pick[i][PickGives]) AddVehicleComponent(GetPlayerVehicleID(playerid), 1010),TakedPick[playerid] = Pick[i][PickGives];
            if(
Pick[i][PickGives] == 12 && TakedPick[playerid] != Pick[i][PickGives]) VehChange(playerid,413,false),TakedPick[playerid] = Pick[i][PickGives];
            if(
Pick[i][PickGives] == 13 && TakedPick[playerid] != Pick[i][PickGives]) VehChange(playerid,462,false),TakedPick[playerid] = Pick[i][PickGives];
            if(
Pick[i][PickGives] == 14 && TakedPick[playerid] != Pick[i][PickGives]) VehChange(playerid,411,false),TakedPick[playerid] = Pick[i][PickGives];
        }
    }
    foreach(new 
i:Player)
    {
        if(
IsPlayerInRangeOfPoint(playerid,5,expPos[i][0],expPos[i][1],expPos[i][2]))
        {
               if(
Pick[i][PickGives] == 11)// && playerid != Pick[i][PickGives])
            
{
                 
CreateExplosion(zPos[playerid][0],zPos[playerid][1],zPos[playerid][2], 1210.0),TakedPick[playerid] = Pick[i][PickGives];
             }
        }
    }

errors codes:
PHP код:
E:\sadf\o.pwn(1315) : error 010invalid function or declaration
E
:\Mods Attractive\Mods Attractive\gamemodes\o.pwn(1318) : error 010invalid function or declaration
E
:\Mods Attractive\Mods Attractive\gamemodes\o.pwn(1320) : error 010invalid function or declaration
E
:\Mods Attractive\Mods Attractive\gamemodes\o.pwn(1322) : error 010invalid function or declaration
E
:\Mods Attractive\Mods Attractive\gamemodes\o.pwn(1323) : error 010invalid function or declaration
E
:\Mods Attractive\Mods Attractive\gamemodes\o.pwn(1324) : error 010invalid function or declaration
E
:\Mods Attractive\Mods Attractive\gamemodes\o.pwn(1325) : error 010invalid function or declaration
E
:\Mods Attractive\Mods Attractive\gamemodes\o.pwn(1326) : error 010invalid function or declaration
E
:\Mods Attractive\Mods Attractive\gamemodes\o.pwn(1327) : error 010invalid function or declaration
E
:\Mods Attractive\Mods Attractive\gamemodes\o.pwn(1328) : error 010invalid function or declaration
E
:\Mods Attractive\Mods Attractive\gamemodes\o.pwn(1329) : error 010invalid function or declaration
E
:\Mods Attractive\Mods Attractive\gamemodes\o.pwn(1330) : error 010invalid function or declaration
E
:\Mods Attractive\Mods Attractive\gamemodes\o.pwn(1331) : error 010invalid function or declaration
E
:\Mods Attractive\Mods Attractive\gamemodes\o.pwn(1332) : error 010invalid function or declaration
E
:\Mods Attractive\Mods Attractive\gamemodes\o.pwn(1333) : error 010invalid function or declaration
E
:\Mods Attractive\Mods Attractive\gamemodes\o.pwn(1334) : error 010invalid function or declaration
E
:\Mods Attractive\Mods Attractive\gamemodes\o.pwn(1335) : error 010invalid function or declaration
E
:\Mods Attractive\Mods Attractive\gamemodes\o.pwn(1338) : error 010invalid function or declaration
E
:\Mods Attractive\Mods Attractive\gamemodes\o.pwn(1340) : error 010invalid function or declaration
E
:\Mods Attractive\Mods Attractive\gamemodes\o.pwn(1342) : error 010invalid function or declaration
E
:\Mods Attractive\Mods Attractive\gamemodes\o.pwn(1349) : warning 203symbol is never used"DOF2_Exit"
E:\Mods Attractive\Mods Attractive\gamemodes\o.pwn(1349) : warning 203symbol is never used"Derby"
E:\Mods Attractive\Mods Attractive\gamemodes\o.pwn(1349) : warning 203symbol is never used"Pick"
E:\Mods Attractive\Mods Attractive\gamemodes\o.pwn(1349) : warning 203symbol is never used"PlayerPos"
E:\Mods Attractive\Mods Attractive\gamemodes\o.pwn(1349) : warning 203symbol is never used"TakedPick"
E:\Mods Attractive\Mods Attractive\gamemodes\o.pwn(1349) : warning 203symbol is never used"zPos"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
20 Errors

Reply
#2

lol this is a mess.

Try to explain your self better I will try to help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)