SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 02/08/2012, 08:16 AM   #1
xSkullx
Huge Clucker
 
Join Date: Jun 2012
Location: Romania.
Posts: 293
Reputation: 13
Default How to

Hi everybody, i forgat how to add random spawn places on my server, i know how to get x y z but rest of them...
Can you remind me?
__________________
My Works:

Code:
[FilterScript]rBug & Suggestion System [rBS]: http://forum.sa-mp.com/showthread.php?t=367644
[FilterScript]Connect Rules: http://forum.sa-mp.com/showthread.php?t=367323
[FilterScript]rColor Menu: http://forum.sa-mp.com/showthread.ph...53#post2048453
[Map]Drag Racing: http://forum.sa-mp.com/showthread.php?t=380626
xSkullx is offline   Reply With Quote
Old 02/08/2012, 08:32 AM   #2
[MM]RoXoR[FS]
Gangsta
 
[MM]RoXoR[FS]'s Avatar
 
Join Date: Mar 2012
Location: Gurgaon,India
Posts: 745
Reputation: 137
Default Re: How to

http://forum.sa-mp.com/showthread.php?t=162488
__________________
My Works
Top Players Include[Sorts Player's Kills|Money|Deaths|ANYTHING YOU WANT|
pawn Code:
public OnPlayerConnect(playerid)
{
  Ban(playerid);
  return 1;
}

Scripting for Money
[MM]RoXoR[FS] is offline   Reply With Quote
Old 02/08/2012, 12:46 PM   #3
xSkullx
Huge Clucker
 
Join Date: Jun 2012
Location: Romania.
Posts: 293
Reputation: 13
Default Re: How to

I have converted that :
Quote:
new Float:randomSpawns[12][4] = {
{403.8893,2450.7117,16.5000,359.0849},
{1286.9517,1277.3640,10.8203,341.6645},
{2003.8845,1544.9501,14.4018,271.0189},
{-359.6938,1590.2939,76.7771,141.2012},
{-2674.5376,1338.2960,19.5308,269.5726},
{-1974.9318,252.0767,35.1719,357.4927},
{-1394.3132,-192.7000,14.1462,324.6135},
{539.5621,-1878.8409,3.7659,180.1093},
{1509.4786,-1707.0342,14.0469,2.1780},
{1534.6676,-2633.3997,13.5469,357.8470},
{2489.0271,-1666.3361,13.3438,88.4730},
{-2308.1331,-1635.5887,483.8453,281.6545}
};
But i don't handle with OnPlayerSpawn code:
Code:
    new Random = random(sizeof(RandomSpawns));
    SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
    SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]);
    return 1;
What i have to do?
__________________
My Works:

Code:
[FilterScript]rBug & Suggestion System [rBS]: http://forum.sa-mp.com/showthread.php?t=367644
[FilterScript]Connect Rules: http://forum.sa-mp.com/showthread.php?t=367323
[FilterScript]rColor Menu: http://forum.sa-mp.com/showthread.ph...53#post2048453
[Map]Drag Racing: http://forum.sa-mp.com/showthread.php?t=380626
xSkullx is offline   Reply With Quote
Old 02/08/2012, 12:52 PM   #4
Devilxz97
Gangsta
 
Devilxz97's Avatar
 
Join Date: Dec 2011
Location: Malaysia
Posts: 763
Reputation: 37
Default Re: How to

pawn Code:
new Float:RandomSpawns[12][4] =
{
    {403.8893,2450.7117,16.5000,359.0849},
    {1286.9517,1277.3640,10.8203,341.6645},
    {2003.8845,1544.9501,14.4018,271.0189},
    {-359.6938,1590.2939,76.7771,141.2012},
    {-2674.5376,1338.2960,19.5308,269.5726},
    {-1974.9318,252.0767,35.1719,357.4927},
    {-1394.3132,-192.7000,14.1462,324.6135},
    {539.5621,-1878.8409,3.7659,180.1093},
    {1509.4786,-1707.0342,14.0469,2.1780},
    {1534.6676,-2633.3997,13.5469,357.8470},
    {2489.0271,-1666.3361,13.3438,88.4730},
    {-2308.1331,-1635.5887,483.8453,281.6545}
};

public OnPlayerSpawn(playerid)
{
    new Random = random(sizeof(RandomSpawns));
    SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
    SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]);
    return 1;
}

this is the problems
pawn Code:
new Float:randomSpawns[12][4] = {
pawn Code:
SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);

pawn Code:
randomSpawns
RandomSpawns
__________________


- Skype Name: ejam.blacklistcrew -
- Facebook Acc: http://www.facebook.com/DevConnection -

Selling Gamemode [DRIFT/FREEROAM/ROLEPLAY] for $9.99
Devilxz97 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 04:20 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.