Litle help
#1

Hello, i need litle help, i have no idea whats the problem.



my includes
PHP код:
#include <a_samp>
#include <cpstream>
#include <dini>
#include <zcmd> 
also the 'new' think..

PHP код:
new Text3D:TOwner[MAX_PLAYERS];
new 
Name[MAX_PLAYER_NAME];
new 
File[256];
new 
SpawnedCar[MAX_PLAYERS];
new 
pCar[MAX_PLAYERS];
#define Cars "CarShop/%s.ini"
new CarCP[MAX_PLAYERS]; 
Reply
#2

have you made in 'new' function at the top of the script?
Reply
#3

You didn't define 'CarCP'
Put at the top of the script
Код:
new CarCP[MAX_PLAYERS];
And another thing may cause you a problem
You've used 'CarCP' for two different things

Firstly to create a CP
And secondly you've set it to 0
Reply
#4

Quote:
Originally Posted by Aleksabre
Посмотреть сообщение
have you made in 'new' function at the top of the script?
of course, lol


Quote:
Originally Posted by UnDetectable
Посмотреть сообщение
You didn't define 'CarCP'
Put at the top of the script
Код:
new CarCP[MAX_PLAYERS];
And another thing may cause you a problem
You've used 'CarCP' for two different things

Firstly to create a CP
And secondly you've set it to 0
I've change it to 1, and the same problem

I think i need to rescript the whole gamemode now
Reply
#5

Try changing the name, and declare it right before the function
pawn Код:
new blabla[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
    blabla[playerid] = 1;
//...
Reply
#6

Quote:

I've change it to 1, and the same problem

I meant that you used 'CarCP' twice for different things
How about leave CarCP for the checkpoint
and create another variable
for example

Код:
new CarCP[MAX_PLAYERS];
new PlayerCarCP[MAX_PLAYERS];

CarCP[playerid] = CP_AddCheck.......
PlayerCarCP[playerid] = 0;
Another question, are you just trying to create a checkpoint ? if no what exactly you are trying to do ?
if yes just remove all of this and create this:

Код:
new CarCP;

public OnGameModeInit()
{
    CarCP = CP_AddCheckpoint(........);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)