#1

Wont SetPlayers CP

pawn Код:
//upper
new Float:MatsCPed[3][3] = {
{122.0939,-186.6473,1.4401},
{1349.7599,242.7418,19.4297},
{2338.0352,67.4235,26.3571}
};


// in function
new rand = random(sizeof(MatsCPed));
SetPlayerCheckpoint(playerid, MatsCPed[rand][0],MatsCPed[rand][1],MatsCPed[rand][2],5.0);

annd... if maximum is 3 of random it will take 0 ?
Reply
#2

Quote:
Originally Posted by GaGlets®
Посмотреть сообщение
Wont SetPlayers CP

pawn Код:
//upper
new Float:MatsCPed[3][3] = {
{122.0939,-186.6473,1.4401},
{1349.7599,242.7418,19.4297},
{2338.0352,67.4235,26.3571}
};


// in function
new rand = random(sizeof(MatsCPed));
SetPlayerCheckpoint(playerid, MatsCPed[rand][0],MatsCPed[rand][1],MatsCPed[rand][2],5.0);

annd... if maximum is 3 of random it will take 0 ?
What do you mean? i can't understand you.
Reply
#3

mhm.. can't see a bug.

and yes random 3 = 0-2
Reply
#4

Ahh.. it wont set a CP for the player.. with..
pawn Код:
new rand = random(sizeof(MatsCPed));
SetPlayerCheckpoint(playerid, MatsCPed[rand][0],MatsCPed[rand][1],MatsCPed[rand][2],5.0);
Reply
#5

Sor for DB..

It even wont set a checkpoint for player if i am doing like this
pawn Код:
new rand = random(3);
            if(rand == 0){ CP[playerid] = 1994; SetPlayerCheckpoint(playerid, 122.0939,-186.6473,1.4401, 5.0); }
            else if(rand == 1) { CP[playerid] = 1995; SetPlayerCheckpoint(playerid, 1349.7599,242.7418,19.4297, 5.0);}
            else if(rand == 2) { CP[playerid] = 1996; SetPlayerCheckpoint(playerid, 2338.0352,67.4235,26.3571, 5.0);}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)