Cps. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Cps. (
/showthread.php?tid=165537)
Cps. -
GaGlets(R) - 05.08.2010
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 ?
Re: Cps. - WackoX - 05.08.2010
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.
Re: Cps. -
ikey07 - 05.08.2010
mhm.. can't see a bug.
and yes random 3 = 0-2
Re: Cps. -
GaGlets(R) - 05.08.2010
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);
Re: Cps. -
GaGlets(R) - 05.08.2010
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);}