new Float:PizzamanCPs[8][4] = { { 2236.3997,167.3553,28.1535, 3.0 }, { 2363.3560,116.1356,28.4416, 3.0 }, { 2374.1240,42.2868,28.4416, 3.0 }, { 2392.2939,-54.9637,28.1536, 3.0 }, { 1291.9042,281.5284,19.5614, 3.0 }, { 1277.0186,370.8626,19.5547, 3.0 }, { 1352.0980,348.4374,20.5009, 3.0 }, { 1402.4236,286.2011,19.5547, 3.0 } };
public OnPlayerEnterCheckpoint(playerid) { if(CheckPoint = PizzamanCPs); { //do blablabla } return 1; }
new PizzamanCPs[8];
PizzamanCps[0] = SetPlayerCheckpoint(); //Create The Checkpoint
PizzamanCps[1] = SetPlayerCheckpoint(); //Same
PizzamanCps[2] = SetPlayerCheckpoint();
PizzamanCps[3] = SetPlayerCheckpoint();
PizzamanCps[4] = SetPlayerCheckpoint();
PizzamanCps[5] = SetPlayerCheckpoint();
PizzamanCps[6] = SetPlayerCheckpoint();
PizzamanCps[7] = SetPlayerCheckpoint();
PizzamanCps[8] = SetPlayerCheckpoint();
public OnPlayerEnterCheckpoint(playerid)
{
if(CheckPoint = PizzamanCPs[0]);
{
//do blablabla
}
return 1;
}
The above will not work because checkpoints are not "created", they are set per player. You cannot set multiple checkpoints through the native checkpoint function set.
|
PHP код:
|
You must define CCP, because when I put the Checkpoint cords it says invaild function or declaration, so no.
It's like making a function that doesn't exist. |
new PizzamanCPs[8];
PizzamanCps[0] = SetPlayerCheckpoint(parameters here); //Create The Checkpoint PizzamanCps[1] = SetPlayerCheckpoint(x,y,z); //Same PizzamanCps[2] = SetPlayerCheckpoint(); PizzamanCps[3] = SetPlayerCheckpoint(); PizzamanCps[4] = SetPlayerCheckpoint(); PizzamanCps[5] = SetPlayerCheckpoint(); PizzamanCps[6] = SetPlayerCheckpoint(); PizzamanCps[7] = SetPlayerCheckpoint(); PizzamanCps[8] = SetPlayerCheckpoint(); public OnPlayerEnterDynamicCheckpoint(playerid) { if(CheckPoint = PizzamanCPs[0]); { //do blablabla } return 1; } just add parameters. |
C:\Users\Fishy\Desktop\New folder (2)\gamemodes\ROLEPLAY.pwn(58) : error 010: invalid function or declaration
new PizzamanCPs[8]; PizzamanCps[0] = SetPlayerCheckpoint(playerid, 2236.3997,167.3553,28.1535, 3.0);
It gives me these errors
Код:
C:\Users\Fishy\Desktop\New folder (2)\gamemodes\ROLEPLAY.pwn(58) : error 010: invalid function or declaration Код:
new PizzamanCPs[8]; PizzamanCps[0] = SetPlayerCheckpoint(playerid, 2236.3997,167.3553,28.1535, 3.0); |