SA-MP Forums Archive
Random Spawn Help :( - 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: Random Spawn Help :( (/showthread.php?tid=263129)



Random Spawn Help :( - y@sin1 - 20.06.2011

Vehicle and Player random spawn be

{2218.12915039,1613.92199707,999.63289697},
{2220.36425781,1571.91381836,999.61470850},
{2182.41430664,1591.57788086,999.62574658},


Re: Random Spawn Help :( - y@sin1 - 20.06.2011

Helpp


Re: Random Spawn Help :( - [L3th4l] - 20.06.2011

pawn Код:
new
    Float: iRandSpawns[][] = {
    {2218.12915039,1613.92199707,999.63289697},
    {2220.36425781,1571.91381836,999.61470850},
    {2182.41430664,1591.57788086,999.62574658}
};

new
    iRand = random(sizeof(iRandSpawns));

SetPlayerPos(playerid, iRandSpawns[iRand][0], iRandSpawns[iRand][1], iRandSpawns[iRand][2]);



Re: Random Spawn Help :( - y@sin1 - 21.06.2011

Quote:
Originally Posted by [L3th4l]
Посмотреть сообщение
pawn Код:
new
    Float: iRandSpawns[][] = {
    {2218.12915039,1613.92199707,999.63289697},
    {2220.36425781,1571.91381836,999.61470850},
    {2182.41430664,1591.57788086,999.62574658}
};

new
    iRand = random(sizeof(iRandSpawns));

SetPlayerPos(playerid, iRandSpawns[iRand][0], iRandSpawns[iRand][1], iRandSpawns[iRand][2]);
Noo
player and venicle to


Re: Random Spawn Help :( - y@sin1 - 21.06.2011

help


Re: Random Spawn Help :( - PCheriyan007 - 21.06.2011

pawn Код:
new
    Float: iRandSpawns[][] = {
    {2218.12915039,1613.92199707,999.63289697},
    {2220.36425781,1571.91381836,999.61470850},
    {2182.41430664,1591.57788086,999.62574658}
};

new
    iRand = random(sizeof(iRandSpawns)),
    Float:playerX,
    Float:playerY,
    Float:playerZ,
    playerveh;

SetPlayerPos(playerid, iRandSpawns[iRand][0], iRandSpawns[iRand][1], iRandSpawns[iRand][2]);

GetPlayerPos(playerid, playerX, playerY, playerZ);

playerveh = CreateVehicle(playerX, playerY, playerZ, time);

OnPlayerSpawn(playerid)
{
    PutPlayerInVehicle(playerid, playerveh);
    // other stuff
    return 1;
}



Re: Random Spawn Help :( - y@sin1 - 21.06.2011

error;

C:\Users\Yasin\Desktop\Untitled.pwn(59) : error 017: undefined symbol "playerveh"
C:\Users\Yasin\Desktop\Untitled.pwn(86) : warning 213: tag mismatch
C:\Users\Yasin\Desktop\Untitled.pwn(86) : error 017: undefined symbol "time"
C:\Users\Yasin\Desktop\Untitled.pwn(86) : warning 204: symbol is assigned a value that is never used: "playerveh"
C:\Users\Yasin\Desktop\Untitled.pwn(86 -- 91) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.