SetPlayerCheckpoint -
cruising - 16.11.2011
hello!
Im making some random checkpoints, but they only shown on the minimap, and when you get there you see no checkpoint.
i guess it is because i have no radius defined for them, and i don't know how to do that in what way i create them.
Here is the code
CODE:
pawn Код:
new Float:Randommission[][4] =
{
{405.7452,2442.8865,16.5000},
{1664.6863,1337.0352,10.7705},
{-1441.6310,-206.0983,6.0000},
{1921.9943,-2235.5515,13.5469}
};
COMMAND:mission(playerid, params[])
{
new rand = random(sizeof(Randommission));
SetPlayerCheckpoint(playerid, Randommission[rand][0], Randommission[rand][1],Randommission[rand][2],Randommission[rand][3]);
return 1;
}
AW: SetPlayerCheckpoint -
Babul - 16.11.2011
youre right ^^
Код:
SetPlayerCheckpoint(playerid, Randommission[rand][0], Randommission[rand][1],Randommission[rand][2],Randommission[rand][3],4.0000);
Re: AW: SetPlayerCheckpoint -
cruising - 16.11.2011
Quote:
Originally Posted by Babul
youre right ^^
Код:
SetPlayerCheckpoint(playerid, Randommission[rand][0], Randommission[rand][1],Randommission[rand][2],Randommission[rand][3],4.0000);
|
it gives me a warning.
pawn Код:
warning 202: number of arguments does not match definition
Re: SetPlayerCheckpoint -
Joshb93 - 16.11.2011
Ya, hes right. Just define the radius, then it should work. If you would like any additional help, you can contact me via Skype @ josh.beverly
Re: SetPlayerCheckpoint -
cruising - 16.11.2011
Quote:
Originally Posted by Joshb93
Ya, hes right. Just define the radius, then it should work. If you would like any additional help, you can contact me via Skype @ josh.beverly
|
its just that i dont know where or how to define the radius.
Added ur skype
Re: SetPlayerCheckpoint -
Wesley221 - 16.11.2011
pawn Код:
new Float:Randommission[][4] =
{
{405.7452,2442.8865,16.5000,RADIUSHERE},
{1664.6863,1337.0352,10.7705,RADIUSHERE},
{-1441.6310,-206.0983,6.0000,RADIUSHERE},
{1921.9943,-2235.5515,13.5469,RADIUSHERE}
};
COMMAND:mission(playerid, params[])
{
new rand = random(sizeof(Randommission));
SetPlayerCheckpoint(playerid, Randommission[rand][0], Randommission[rand][1],Randommission[rand][2],Randommission[rand][3]);
return 1;
}
Change the 'RADIUSHERE' with the radius you want. That will be Randommission[#][3] like you've already created above
Re: SetPlayerCheckpoint -
cruising - 16.11.2011
Quote:
Originally Posted by Wesley221
pawn Код:
new Float:Randommission[][4] = { {405.7452,2442.8865,16.5000,RADIUSHERE}, {1664.6863,1337.0352,10.7705,RADIUSHERE}, {-1441.6310,-206.0983,6.0000,RADIUSHERE}, {1921.9943,-2235.5515,13.5469,RADIUSHERE} };
COMMAND:mission(playerid, params[]) { new rand = random(sizeof(Randommission)); SetPlayerCheckpoint(playerid, Randommission[rand][0], Randommission[rand][1],Randommission[rand][2],Randommission[rand][3]); return 1; }
Change the 'RADIUSHERE' with the radius you want. That will be Randommission[#][3] like you've already created above
|
Ahhh thank you very much!