SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 01/01/2012, 10:18 AM   #1
the.et
Little Clucker
 
Join Date: Jul 2011
Posts: 41
Reputation: 5
Unhappy :( Stay within world boundaries error....

hi ,
i have been trying to make on SINGLE CHECKPOINT for the pass few hours and keep on getting errors , the latest one is "Please stay within world bourdaries" when i spawn my character.
I am using Incognito's Streamer include and CreateDynamicCP()

Here's my code untill Player spawn (below it i haven't did anything)
Code:
#include <a_samp>
#include <streamer>
#include <zcmd>
#include <sscanf2>
#include <dutils>
#include <YSI/y_ini>

new Checkpoint[2];
/*------------------------------------------------------
 Colors Define ****************************************
-------------------------------------------------------*/
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_BLUE 0x0000BBAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_RED 0xAA3333AA
#define COLOR_LIME 0x10F441AA
#define COLOR_MAGENTA 0xFF00FFFF
#define COLOR_NAVY 0x000080AA
#define COLOR_AQUA 0xF0F8FFAA
#define COLOR_CRIMSON 0xDC143CAA
#define COLOR_FLBLUE 0x6495EDAA
#define COLOR_BISQUE 0xFFE4C4AA
#define COLOR_BLACK 0x000000AA
#define COLOR_CHARTREUSE 0x7FFF00AA
#define COLOR_BROWN 0XA52A2AAA
#define COLOR_CORAL 0xFF7F50AA
#define COLOR_GOLD 0xB8860BAA
#define COLOR_GREENYELLOW 0xADFF2FAA
#define COLOR_INDIGO 0x4B00B0AA
#define COLOR_IVORY 0xFFFF82AA
#define COLOR_LAWNGREEN 0x7CFC00AA
#define COLOR_LIMEGREEN 0x32CD32AA //<--- Dark lime
#define COLOR_MIDNIGHTBLUE 0X191970AA
#define COLOR_MAROON 0x800000AA
#define COLOR_OLIVE 0x808000AA
#define COLOR_ORANGERED 0xFF4500AA
#define COLOR_PINK 0xFFC0CBAA // - Light light pink
#define COLOR_SEAGREEN 0x2E8B57AA
#define COLOR_SPRINGGREEN 0x00FF7FAA
#define COLOR_TOMATO 0xFF6347AA // - Tomato >:/ sounds wrong lol... well... :P
#define COLOR_YELLOWGREEN 0x9ACD32AA //- like military green
#define COLOR_MEDIUMAQUA 0x83BFBFAA
#define COLOR_MEDIUMMAGENTA 0x8B008BAA // dark magenta ^^
#define COLOR_GREY        0xAFAFAFAA
#define COLOR_GREEN       0x33AA33AA
#define COLOR_BRIGHTRED   0xFF0000AA
#define COLOR_DARKRED     0xC60000FF
#define COLOR_YELLOW      0xFFFF00AA
#define COLOR_TAN         0xBDB76BAA
#define COLOR_PURPLE      0x800080AA
#define COLOR_WHITE       0xFFFFFFAA
#define COLOR_LIGHTBLUE   0x33CCFFAA
#define COLOR_ORANGE      0xFF9900AA
#define COLOR_INDIGO      0x4B00B0AA
#define COLOR_SYSTEM      0xa9c4e4
#define COLOR_SANTORANGE  0xFF6C3BAA
#define COLOR_INVIS       0xAFAFAF00
#define COLOR_CRIMBLUE    0x3A47DEFF
#define COLOR_WANTED      0xCC0066AA
#define COLOR_GROVE       0x378729FF
#define COLOR_BALLAS      0xA31D88FF
#define COLOR_DARKGREY    0x696969FF
#define COLOR_ERPSS       0x549852FF
#define COLOR_L1A         0x50A2ABFF
#define COLOR_FADE1       0xE6E6E6E6
#define COLOR_FADE2       0xC8C8C8C8
#define COLOR_FADE3       0xAAAAAAAA
#define COLOR_FADE4       0x8C8C8C8C
#define COLOR_FADE5       0x6E6E6E6E
#define BLACK             0x000000FF

/*------------------------------------------------------
 ******************************** End of Colors Define
-------------------------------------------------------*/
#define DEVELOPER "test"
#define VERSION "v.0.0.1a"
#undef MAX_PLAYERS
#define MAX_PLAYERS 50

/*------------------------------------------------------
 START OF SCRIPT
-------------------------------------------------------*/
#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print("TEST");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
    print("Tutorial Script");
    printf("Version: %s", VERSION);
    printf("Developer: %s", DEVELOPER);
}

#endif


/*------------------------------------------------------------
Game Initiate <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-------------------------------------------------------------*/
public OnGameModeInit()
{
    DisableInteriorEnterExits();
    AddPlayerClass(0,2271.2456,2405.2004,10.8203,320.2789,0,0,0,0,0,0);
    SetGameModeText("Test");
    return 1;
}

/*------------------------------------------------------------
 End of Game Initiate
-------------------------------------------------------------*/

public OnGameModeExit()
{
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 2271.2456,2405.2004,10.8203);
    SetPlayerCameraPos(playerid, 2271.2456,2405.2004,10.8203);
    SetPlayerCameraLookAt(playerid, 2271.2456,2405.2004,10.8203);
    return 1;
}

/*---------------------------------------------------------------------
On Player connect
----------------------------------------------------------------------*/
public OnPlayerConnect(playerid)
{
return 1;
}


/*---------------------------------------------------------------------
On Player dicconnect
----------------------------------------------------------------------*/


public OnPlayerDisconnect(playerid, reason)
{
  
	return 1;
}

/*---------------------------------------------------------------------
On Player
----------------------------------------------------------------------*/

public OnPlayerSpawn(playerid)
{
    Checkpoint[0] = CreateDynamicCP(-2112.7422,-753.4459,32.1719, 4, -1, -1, -1, 100); // Creates a checkpoint at -2112.7422,-753.4459,32.1719 with a range of 4, in any virtualworld, interior and for every player
    Checkpoint[1] = CreateDynamicCP(-2112.9177,-760.9539,32.1719, 4, 5, -1, -1, 100); // Creates a checkpoint at -2112.9177,-760.9539,32.1719 with a range of 4, in virtualworld 5, any interior, and for every player
    return 1;
}
When i remove the <streamer> include , everything went back to normal and no errors (but my checkpoint will not work of course).

Please , i hope someone can help me on this.


I a newbie just started SAMP server programming

the.et is offline   Reply With Quote
Old 01/01/2012, 10:24 AM   #2
spedico
Huge Clucker
 
spedico's Avatar
 
Join Date: Jul 2010
Location: Finland
Posts: 237
Reputation: 35
Default Re: :( Stay within world boundaries error....

You need to put the checkpoint creation code to OnGameModeInit, not OnPlayerSpawn
spedico is offline   Reply With Quote
Old 01/01/2012, 10:32 AM   #3
the.et
Little Clucker
 
Join Date: Jul 2011
Posts: 41
Reputation: 5
Default Re: :( Stay within world boundaries error....

thanks for replying..same error...i put it in OnGamemodeInt

Code:
public OnGameModeInit()
{
    DisableInteriorEnterExits();
    AddPlayerClass(0,2271.2456,2405.2004,10.8203,320.2789,0,0,0,0,0,0);
    SetGameModeText("Test");
    Checkpoint[0] = CreateDynamicCP(-2112.7422,-753.4459,32.1719, 4, -1, -1, -1, 100); // Creates a checkpoint at -2112.7422,-753.4459,32.1719 with a range of 4, in any virtualworld, interior and for every player
    Checkpoint[1] = CreateDynamicCP(-2112.9177,-760.9539,32.1719, 4, 5, -1, -1, 100); // Creates a checkpoint at -2112.9177,-760.9539,32.1719 with a range of 4, in virtualworld 5, any interior, and for every player
    return 1;
}
the.et is offline   Reply With Quote
Old 01/01/2012, 10:40 AM   #4
the.et
Little Clucker
 
Join Date: Jul 2011
Posts: 41
Reputation: 5
Default Re: :( Stay within world boundaries error....

when i dont include streamer , everything works fine...
the.et is offline   Reply With Quote
Old 01/01/2012, 10:49 AM   #5
spedico
Huge Clucker
 
spedico's Avatar
 
Join Date: Jul 2010
Location: Finland
Posts: 237
Reputation: 35
Default Re: :( Stay within world boundaries error....

Do you have the streamer plugin aswell? Does the console say that it was loaded successfully?
spedico is offline   Reply With Quote
Old 01/01/2012, 10:58 AM   #6
the.et
Little Clucker
 
Join Date: Jul 2011
Posts: 41
Reputation: 5
Default Re: :( Stay within world boundaries error....

Yeah. i put streamer.inc in my pawno include and when i start the server everything is loaded well.
the.et is offline   Reply With Quote
Old 01/01/2012, 11:01 AM   #7
the.et
Little Clucker
 
Join Date: Jul 2011
Posts: 41
Reputation: 5
Default Re: :( Stay within world boundaries error....

or do you know any full tutorials on checkpoints using streamer? thankss.
the.et 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stay within the world boundaries LeNy Scripting Help 4 05/11/2011 03:03 PM
Stay within the world boundaries Do y@sin1 Help Archive 2 10/03/2011 07:08 AM
Stay within the world boundaries Help :( y@sin1 Help Archive 5 07/03/2011 07:17 PM


All times are GMT. The time now is 12:26 AM.


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