SA-MP Forums Archive
-Solved- - 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: -Solved- (/showthread.php?tid=153126)



-Solved- - Jay. - 07.06.2010

Yo, Well i have a little problem.

Anyway are try to explain.

I have made somthing like this bellow.


Код:
OnPlayerEnterCheckPoint(playerid)
{
  CreateObject(9833, 2447.8569335938, -1457.5008544922, 18.702543258667, 0.000000, 0.000000, 0.000000); //
CreateObject(9833, 2448.8068847656, -1464.8422851563, 18.702543258667, 0.000000, 0.000000, 0.000000); //
CreateObject(9833, 2452.6469726563, -1463.9128417969, 18.702543258667, 0.000000, 0.000000, 0.000000); //
CreateObject(9833, 2458.9140625, -1463.9417724609, 18.702543258667, 0.000000, 0.000000, 0.000000); //
CreateObject(9833, 2447.1611328125, -1460.8927001953, 19.202543258667, 0.000000, 0.000000, 0.000000); //
CreateObject(9833, 2453.1611328125, -1460.869140625, 19.202543258667, 0.000000, 0.000000, 0.000000); //
CreateObject(9833, 2459.1611328125, -1460.798828125, 19.202543258667, 0.000000, 0.000000, 0.000000); //
CreateObject(9833, 2463.6845703125, -1462.74609375, 19.202543258667, 0.000000, 0.000000, 0.000000); //
CreateObject(9833, 2463.6376953125, -1458.74609375, 19.202543258667, 0.000000, 0.000000, 0.000000); //
CreateObject(9833, 2466.67578125, -1461.9609375, 19.202543258667, 0.000000, 0.000000, 0.000000); //
CreateObject(9833, 2466.705078125, -1464.4609375, 19.202543258667, 0.000000, 0.000000, 0.000000); //
CreateObject(9833, 2465.6677246094, -1459.7287597656, 19.702543258667, 0.000000, 0.000000, 0.000000); //
CreateObject(2780, 2462.2846679688, -1461.2032470703, 22, 0.000000, 0.000000, 0.000000); //
CreateObject(2780, 2448.1413574219, -1461.3049316406, 22, 0.000000, 0.000000, 0.000000); //
}


Now when the Player enters this checkpoint, It doesn't create the objects, Why not?

Is there another funtion or somthing?


Re: Problem with CreateObject - MadeMan - 07.06.2010

It works for me


Re: Problem with CreateObject - External-Life - 07.06.2010

Kinda new to coding my self but... i believe it should be
Код:
OnPlayerEnterCheckPoint(playerid)
{
  CreateObject(9833, 2447.8569335938, -1457.5008544922, 18.702543258667, 0.000000, 0.000000, 0.000000); //
CreateObject(9833, 2448.8068847656, -1464.8422851563, 18.702543258667, 0.000000, 0.000000, 0.000000); //
CreateObject(9833, 2452.6469726563, -1463.9128417969, 18.702543258667, 0.000000, 0.000000, 0.000000); //
CreateObject(9833, 2458.9140625, -1463.9417724609, 18.702543258667, 0.000000, 0.000000, 0.000000); //
CreateObject(9833, 2447.1611328125, -1460.8927001953, 19.202543258667, 0.000000, 0.000000, 0.000000); //
CreateObject(9833, 2453.1611328125, -1460.869140625, 19.202543258667, 0.000000, 0.000000, 0.000000); //
CreateObject(9833, 2459.1611328125, -1460.798828125, 19.202543258667, 0.000000, 0.000000, 0.000000); //
CreateObject(9833, 2463.6845703125, -1462.74609375, 19.202543258667, 0.000000, 0.000000, 0.000000); //
CreateObject(9833, 2463.6376953125, -1458.74609375, 19.202543258667, 0.000000, 0.000000, 0.000000); //
CreateObject(9833, 2466.67578125, -1461.9609375, 19.202543258667, 0.000000, 0.000000, 0.000000); //
CreateObject(9833, 2466.705078125, -1464.4609375, 19.202543258667, 0.000000, 0.000000, 0.000000); //
CreateObject(9833, 2465.6677246094, -1459.7287597656, 19.702543258667, 0.000000, 0.000000, 0.000000); //
CreateObject(2780, 2462.2846679688, -1461.2032470703, 22, 0.000000, 0.000000, 0.000000); //
CreateObject(2780, 2448.1413574219, -1461.3049316406, 22, 0.000000, 0.000000, 0.000000); //
DisablePlayerCheckpoint(playerid);
return 1;
}



Re: Problem with CreateObject - Jay. - 07.06.2010

Ok, Yes i'm new to scripting but i'm gonna change, What i'm talking about a little.


Right so i want to make it so when you open a menu and select somthing it will create the objects

Look are show you.

Код:
{
  switch(row)
  {
   case 0:
   {
			if(GetPlayerMoney(playerid) >1000)
			{

        
        
       CreateObject(9833, 2447.8569335938, -1457.5008544922, 18.702543258667, 0.000000, 0.000000, 0.000000); //
       CreateObject(9833, 2448.8068847656, -1464.8422851563, 18.702543258667, 0.000000, 0.000000, 0.000000); //
       CreateObject(9833, 2452.6469726563, -1463.9128417969, 18.702543258667, 0.000000, 0.000000, 0.000000); //
       CreateObject(9833, 2458.9140625, -1463.9417724609, 18.702543258667, 0.000000, 0.000000, 0.000000); //
       CreateObject(9833, 2447.1611328125, -1460.8927001953, 19.202543258667, 0.000000, 0.000000, 0.000000); //
       CreateObject(9833, 2453.1611328125, -1460.869140625, 19.202543258667, 0.000000, 0.000000, 0.000000); //
       CreateObject(9833, 2459.1611328125, -1460.798828125, 19.202543258667, 0.000000, 0.000000, 0.000000); //
       CreateObject(9833, 2463.6845703125, -1462.74609375, 19.202543258667, 0.000000, 0.000000, 0.000000); //
       CreateObject(9833, 2463.6376953125, -1458.74609375, 19.202543258667, 0.000000, 0.000000, 0.000000); //
       CreateObject(9833, 2466.67578125, -1461.9609375, 19.202543258667, 0.000000, 0.000000, 0.000000); //
        CreateObject(9833, 2466.705078125, -1464.4609375, 19.202543258667, 0.000000, 0.000000, 0.000000); //
        CreateObject(9833, 2465.6677246094, -1459.7287597656, 19.702543258667, 0.000000, 0.000000, 0.000000); //
        CreateObject(2780, 2462.2846679688, -1461.2032470703, 22, 0.000000, 0.000000, 0.000000); //
        CreateObject(2780, 2448.1413574219, -1461.3049316406, 22, 0.000000, 0.000000, 0.000000); //
        
        SendClientMessage(playerid,LIGHT_BLUE, "You have selected the 5 seconds wash thats $1000");
			  GivePlayerMoney(playerid,-1000);
			  return 1;
			  }
This is a menu now it doesn't create the objects for some reason.


Re: Problem with CreateObject - Jay. - 07.06.2010

anyone?


Re: Problem with CreateObject - MadeMan - 07.06.2010

Can you see the message?


Re: Problem with CreateObject - Jay. - 07.06.2010

Ye, I see the message but not the objects.

Any idea why?


EDIT: Should of used modify S:


Re: Problem with CreateObject - MadeMan - 07.06.2010

How many objects do you have in your server?


Re: Problem with CreateObject - Jay. - 07.06.2010

Oh god damit Lol i forgot about the stunts S:


Thats why object limet


Thanks for your help btw.