Re: [INC] CPS - CheckPoint Streamer by DragSta -
BioFreeze - 20.11.2008
Ok I have a question , I want to use the use checkpoint for enableing menu's.
How exactly would that look?
Something more like:
Код:
checkpoint = CreateCheckpoint();
Код:
Public OnPlayerEnterStreamedCheckpoint(playerid, streamid);
{
if(streamid = checkpoint)
{
ShowMenuForPlayer(blabla, playerid);
}
return 1;
}
Any suggestions for using your streamer in the best way?
Re: [INC] CPS - CheckPoint Streamer by DragSta -
domidom - 20.11.2008
Yeah thats basically it, obviously you need to fill CreateCheckpoint in.
Also your callback is slightly broken, try this:
pawn Код:
public OnPlayerEnterStreamedCheckpoint(playerid, streamid)
{
if(streamid == checkpoint)
{
ShowMenuForPlayer(blabla, playerid);
return 1;
}
return 1;
}
Re: [INC] CPS - CheckPoint Streamer by DragSta -
Karlip - 20.11.2008
Good job Dragsta!
Re: [INC] CPS - CheckPoint Streamer by DragSta -
BioFreeze - 21.11.2008
You have any idea what's may causing this ? Because I did everything in the way you told in the first post.
Код:
D:\SA MP servers\RolePlay 0.2.2\pawno\include\cps.inc(140) : warning 208: function with tag result used before definition, forcing reparse
EDIT:
And I do have SyncCheckpoints(playerid); under ClearVars(playerid); at OnPlayerConnect.
Re: [INC] CPS - CheckPoint Streamer by DragSta -
Mikep - 21.11.2008
Dragsta had to disable something in the include to make it work, which causes this warning. Just ignore it
Re: [INC] CPS - CheckPoint Streamer by DragSta -
BioFreeze - 21.11.2008
Quote:
Originally Posted by Mikep
Dragsta had to disable something in the include to make it work, which causes this warning. Just ignore it 
|
I hate warnings -.- , but if it aint my mistake I don't mind :P
Re: [INC] CPS - CheckPoint Streamer by DragSta -
domidom - 22.11.2008
Quote:
Originally Posted by Biofreeze
Quote:
Originally Posted by Mikep
Dragsta had to disable something in the include to make it work, which causes this warning. Just ignore it 
|
I hate warnings -.- , but if it aint my mistake I don't mind :P
|
Yeah its my mistake, I tried to fix it (using Westie's fix posted on the first page) but it stopped the function from working at all so I gave up

Still works perfectly.
Re: [INC] CPS - CheckPoint Streamer by DragSta -
BioFreeze - 22.11.2008
Quote:
Originally Posted by DragSta
Quote:
Originally Posted by Biofreeze
Quote:
Originally Posted by Mikep
Dragsta had to disable something in the include to make it work, which causes this warning. Just ignore it 
|
I hate warnings -.- , but if it aint my mistake I don't mind :P
|
Yeah its my mistake, I tried to fix it (using Westie's fix posted on the first page) but it stopped the function from working at all so I gave up 
Still works perfectly.
|
Yes I tested it and I'm using , and im still very pleased
Re: [INC] CPS - CheckPoint Streamer by DragSta -
BioFreeze - 04.12.2008
Uhm I encountered a small problem , the checkpoints only activate the menu when I walk through it . When other players walk through my 3 streamed checkpoints , nothing happens :S. They are able to see the checkpoint , but it does not enable the menu for them.
Code >
Код:
public OnPlayerEnterStreamedCheckpoint(playerid, streamid)
{
if(streamid == chickencp1)
{
ShowMenuForPlayer(foodmenu, playerid);
TogglePlayerControllable(playerid,0);
return 1;
}
return 1;
}
Re: [INC] CPS - CheckPoint Streamer by DragSta -
domidom - 04.12.2008
Quote:
Originally Posted by Biofreeze
Uhm I encountered a small problem , the checkpoints only activate the menu when I walk through it . When other players walk through my 3 streamed checkpoints , nothing happens :S. They are able to see the checkpoint , but it does not enable the menu for them.
Code >
Код:
public OnPlayerEnterStreamedCheckpoint(playerid, streamid)
{
if(streamid == chickencp1)
{
ShowMenuForPlayer(foodmenu, playerid);
TogglePlayerControllable(playerid,0);
return 1;
}
return 1;
}
|
Hmm I havent encountered that problem before, let me do some research and I will get back to you with a resolution...Hopefully.
Re: [INC] CPS - CheckPoint Streamer by DragSta -
refshal - 08.07.2009
Quote:
Originally Posted by [eX
Klutty ]
Code:
if(streamid == dockCP && modelid == infernus))
|
Pfft, modelid = infernus. FAIL! XD
Replace the "infernus" with "411".
Re: [INC] CPS - CheckPoint Streamer by DragSta -
Nero_3D - 08.07.2009
Quote:
Originally Posted by еddy
Quote:
Originally Posted by [eX
Klutty ]
Code:
if(streamid == dockCP && modelid == infernus))
|
Pfft, modelid = infernus. FAIL! XD
Replace the "infernus" with "411".
|
maybe he just did somewhere before
#define infernus 411
and that surly wasnt the reason for the error
Re: [INC] CPS - CheckPoint Streamer by DragSta -
refshal - 08.07.2009
Quote:
Originally Posted by ♣ ⓐⓢⓢ
Quote:
Originally Posted by еddy
Quote:
Originally Posted by [eX
Klutty ]
Code:
if(streamid == dockCP && modelid == infernus))
|
Pfft, modelid = infernus. FAIL! XD
Replace the "infernus" with "411".
|
maybe he just did somewhere before
#define infernus 411
and that surly wasnt the reason for the error
|
Maybe you're right, and maybe not.
@Klutty: Try this:
Code:
if(streamid == dockCP && modelid == infernus) // With infernus, 411, or whatever you want. >_<
Re: [INC] CPS - CheckPoint Streamer by DragSta -
Klutty - 08.07.2009
Quote:
Originally Posted by еddy
Quote:
Originally Posted by ♣ ⓐⓢⓢ
Quote:
Originally Posted by еddy
Quote:
Originally Posted by [eX
Klutty ]
Code:
if(streamid == dockCP && modelid == infernus))
|
Pfft, modelid = infernus. FAIL! XD
Replace the "infernus" with "411".
|
maybe he just did somewhere before
#define infernus 411
and that surly wasnt the reason for the error
|
Maybe you're right, and maybe not.
@Klutty: Try this:
Code:
if(streamid == dockCP && modelid == infernus) // With infernus, 411, or whatever you want. >_<
|
I have an include so I can write vehicle names instead of wandering around SA-MP wiki for id's.
EDIT: Thanks, it works.
Re: [INC] CPS - CheckPoint Streamer by DragSta -
Klutty - 08.07.2009
Sorry for double post.
When I enter the checkpoint with an infernus im supposed to get 100.000, but I dont get that money when I enter..
My code:
Code:
public OnPlayerEnterStreamedCheckpoint(playerid, streamid)
{
new modelid = GetVehicleModel(GetPlayerVehicleID(playerid));
if(streamid == dockCP && modelid == 411)
{
GivePlayerMoney(playerid, 100000);
new string[128];
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playername));
format(string, sizeof(string), "%s has won the event!",playername);
SendClientMessageToAll(COLOR_LIGHTBLUE,string);
DestroyCheckpoint(dockCP);
}
else
{
SendClientMessage(playerid,COLOR_BRIGHTRED,"ERROR: Wrong car! This is not an infernus!");
}
return 1;
}
Re: [INC] CPS - CheckPoint Streamer by DragSta -
refshal - 09.07.2009
Quote:
Originally Posted by [eX
Klutty ]
Sorry for double post.
When I enter the checkpoint with an infernus im supposed to get 100.000, but I dont get that money when I enter..
My code:
Code:
public OnPlayerEnterStreamedCheckpoint(playerid, streamid)
{
new modelid = GetVehicleModel(GetPlayerVehicleID(playerid));
if(streamid == dockCP && modelid == 411)
{
GivePlayerMoney(playerid, 100000);
new string[128];
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playername));
format(string, sizeof(string), "%s has won the event!",playername);
SendClientMessageToAll(COLOR_LIGHTBLUE,string);
DestroyCheckpoint(dockCP);
}
else
{
SendClientMessage(playerid,COLOR_BRIGHTRED,"ERROR: Wrong car! This is not an infernus!");
}
return 1;
}
|
Try to add the GivePlayerMoney above the DestroyCheckpoint.
Re: [INC] CPS - CheckPoint Streamer by DragSta -
Klutty - 09.07.2009
Quote:
Originally Posted by еddy
Quote:
Originally Posted by [eX
Klutty ]
Sorry for double post.
When I enter the checkpoint with an infernus im supposed to get 100.000, but I dont get that money when I enter..
My code:
Code:
public OnPlayerEnterStreamedCheckpoint(playerid, streamid)
{
new modelid = GetVehicleModel(GetPlayerVehicleID(playerid));
if(streamid == dockCP && modelid == 411)
{
GivePlayerMoney(playerid, 100000);
new string[128];
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playername));
format(string, sizeof(string), "%s has won the event!",playername);
SendClientMessageToAll(COLOR_LIGHTBLUE,string);
DestroyCheckpoint(dockCP);
}
else
{
SendClientMessage(playerid,COLOR_BRIGHTRED,"ERROR: Wrong car! This is not an infernus!");
}
return 1;
}
|
Try to add the GivePlayerMoney above the DestroyCheckpoint.
|
It is already above that.
Re: [INC] CPS - CheckPoint Streamer by DragSta -
refshal - 09.07.2009
Quote:
Originally Posted by [eX
Klutty ]
It is already above that.
|
No, I mean:
Code:
SendClientMessageToAll(COLOR_LIGHTBLUE,string);
GivePlayerMoney(playerid, 100000);
DestroyCheckpoint(dockCP);
Above the DestroyCheckpoint, and below the SendClientMessageToAll.
Re: [INC] CPS - CheckPoint Streamer by DragSta -
GTAIV2008 - 13.07.2009
DestroyCheckpoint() won't work for me...
Re: [INC] CPS - CheckPoint Streamer by DragSta -
smoker08 - 13.07.2009
If you get the error "function with tag result used before definition, forcing reparse" then you need to open the cp.inc file go at the bottom of the script and uncomment this:
Code:
forward Float:DistanceBetweenPoints(Float:x11, Float:y11, Float:z11, Float:x22, Float:y22, Float:z22);
Hope this helps