Otra Vez Yo ! xD' Ayudaa :'( !
#1

PHP код:
public OnPlayerConnect(playerid)
{
    
countpos[playerid] = 0;
    return 
1;
}
public 
Counter()
{
        for(new 
iGetMaxPlayers(); i++)
        {
                if(
IsPlayerConnected(i) && countpos[i] != 0)
                {
                        
countpos[i]++;
                        if(
countpos[i] == 4)
                        {
                                
countpos[i] = 0;
                                
DestroyObject(Flame[i][0]);
                                
DestroyObject(Flame[i][1]);
                        }
                }
        }
        return 
1;
}
public 
OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
        if (
PRESSED(KEY_FIRE))
        {
                new 
vehid GetPlayerVehicleID(playerid);
                if(
GetVehicleModel(vehid) == 522)
                {
                        new 
Float:Velocity[3];
                        
GetVehicleVelocity(vehidVelocity[0], Velocity[1], Velocity[2]);
                        if(
Velocity[0] <1.3  && Velocity[1] < 1.3 && Velocity[0] > -1.3 && Velocity[1] > -1.3)
                        {
                                
SetVehicleVelocity(vehidVelocity[0]*2Velocity[1]*20.0);
                                if(
countpos[playerid] == 0)
                                {
                                        
Flame[playerid][0] = CreateObject(186930.00.00.00.0000);
                                        
Flame[playerid][1] = CreateObject(186930.00.00.00.0000);
                                        
AttachObjectToVehicle(Flame[playerid][0], vehid0.1949990.4399990.04499986.4299620.0000000.000000);
                                        
AttachObjectToVehicle(Flame[playerid][1], vehid, -0.2049990.4399990.04499986.4299620.0000000.000000);
                                        
countpos[playerid] = 1;
                                }
                        }
                }
        }
}
public 
OnPlayerDisconnect(playeridreason)
{
        if(
countpos[playerid] != 0)
        {
                
countpos[playerid] = 0;
                
DestroyObject(Flame[playerid][0]);
                
DestroyObject(Flame[playerid][1]);
        }
        return 
1;

Quote:

C:\Users\Farius\Desktop\Comandos.pwn(65) : error 029: invalid expression, assumed zero
C:\Users\Farius\Desktop\Comandos.pwn(65) : warning 215: expression has no effect
C:\Users\Farius\Desktop\Comandos.pwn(65) : error 001: expected token: ";", but found "]"
C:\Users\Farius\Desktop\Comandos.pwn(65) : error 029: invalid expression, assumed zero
C:\Users\Farius\Desktop\Comandos.pwn(65) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

y plop esos errores soy novato perdon por molestar tanto
Reply
#2

Marcame la linea 65 para no tener que buscar el error. xD
Reply
#3

Quote:

public OnPlayerConnect(playerid)
{
countpos[playerid] = 0;
return 1;
}

hay esta de las 63 a la 67
Reply
#4

Quote:
Originally Posted by ronaldfa
Посмотреть сообщение
hay esta de las 63 a la 67
mostrame como definiste countpos
Reply
#5

Quote:
Originally Posted by GROVE22
Посмотреть сообщение
mostrame como definiste countpos
Quote:

#define countpos

xddd
Reply
#6

Quote:
Originally Posted by ronaldfa
Посмотреть сообщение
xddd
LOL es con un

new countpos[MAX_PLAYERS];
Reply
#7

Quote:
Originally Posted by bytytus
Посмотреть сообщение
LOL es con un

new countpos[MAX_PLAYERS];
xDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD DDDDDDDD
era mas que sabido que era como lo habia definido
Reply
#8

pawn Код:
new countpos[MAX_PLAYERS];
//new Flame[MAX_PLAYERS][2];
EDIT: me ganу bytytus.
Reply
#9

Quote:
Originally Posted by bytytus
Посмотреть сообщение
LOL es con un

new countpos[MAX_PLAYERS];
ya esta puesto .___.
Reply
#10

aqui esta el codigo completo miren ._.

Quote:

/*
==================================================
|[FS] By Omegaki
==================================================
*/

#include <a_samp>

#define PRESSED(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))

new countpos[MAX_PLAYERS];
new Flame[MAX_PLAYERS][2];

forward Counter();

public OnFilterScriptInit()
{
SetTimer("Counter",1000,1);
return 1;
}

public OnPlayerConnect(playerid)
{
countpos[playerid] = 0;
return 1;
}

public Counter()
{
for(new i; i < GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i) && countpos[i] != 0)
{
countpos[i]++;
if(countpos[i] == 4)
{
countpos[i] = 0;
DestroyObject(Flame[i][0]);
DestroyObject(Flame[i][1]);
}
}
}
return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (PRESSED(KEY_FIRE))
{
new vehid = GetPlayerVehicleID(playerid);
if(GetVehicleModel(vehid) == 522)
{
new Float:Velocity[3];
GetVehicleVelocity(vehid, Velocity[0], Velocity[1], Velocity[2]);
if(Velocity[0] <1.3 && Velocity[1] < 1.3 && Velocity[0] > -1.3 && Velocity[1] > -1.3)
{
SetVehicleVelocity(vehid, Velocity[0]*2, Velocity[1]*2, 0.0);
if(countpos[playerid] == 0)
{
Flame[playerid][0] = CreateObject(18693, 0.0, 0.0, 0.0, 0.0, 0, 0, 0);
Flame[playerid][1] = CreateObject(18693, 0.0, 0.0, 0.0, 0.0, 0, 0, 0);
AttachObjectToVehicle(Flame[playerid][0], vehid, 0.194999, 0.439999, 0.044999, 86.429962, 0.000000, 0.000000);
AttachObjectToVehicle(Flame[playerid][1], vehid, -0.204999, 0.439999, 0.044999, 86.429962, 0.000000, 0.000000);
countpos[playerid] = 1;
}
}
}
}
}

public OnPlayerDisconnect(playerid, reason)
{
if(countpos[playerid] != 0)
{
countpos[playerid] = 0;
DestroyObject(Flame[playerid][0]);
DestroyObject(Flame[playerid][1]);
}
return 1;
}

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)