SetPlayerCheckpoint
#1

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;
}
Reply
#2

youre right ^^
Код:
SetPlayerCheckpoint(playerid, Randommission[rand][0], Randommission[rand][1],Randommission[rand][2],Randommission[rand][3],4.0000);
Reply
#3

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
Reply
#4

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
Reply
#5

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
Reply
#6

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
Reply
#7

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!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)