[Tutorial] How to use checkpoints
#21

Nice tutorial.
Reply
#22

Thanks
Reply
#23

Helpful Tutorial N1 Wesley More Tutorials By you would be useful!!
Reply
#24

Quote:
Originally Posted by vassilis
View Post
Helpful Tutorial N1 Wesley More Tutorials By you would be useful!!
Thanks

And what sort of tutorial you would like?
Reply
#25

Emm well i have seen lot tutorials for npcs or textdraws but none was very understandable...well it would be useful to make a simple menu and dialog tutorial for the new scripters.
Reply
#26

Quote:
Originally Posted by vassilis
View Post
Emm well i have seen lot tutorials for npcs or textdraws but none was very understandable...well it would be useful to make a simple menu and dialog tutorial for the new scripters.
Im currencly working on a tutorial, when im done with that one imma make one with menus/dialogs
Reply
#27

hmm ok hope it will be a good one like this..!
Reply
#28

#include a_samp
#define COLOR_YELLOW 0xFFFF00AA
new Ccp[MAX_PLAYERS];

public OnPlayerText(playerid, text[])
{
new textstring[128];
format(textstring, sizeof(textstring), "[%i] %s", playerid, text);
SendPlayerMessageToAll(playerid, textstring);
return 0;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mototele", cmdtext, true, 10)==0)
{
SetPlayerPos(playerid,1224.370849,109.414886,21.41 2073);
SetPlayerInterior(playerid,0);
SendClientMessage(playerid, COLOR_YELLOW, "(INFO)Pata /motomission gia na arxiseis tin apostoli sou!");
return 1;
}
if (strcmp("/motomission", cmdtext, true, 10)==0)
{
SetPlayerCheckpoint(playerid,1139.513671,137.11279 2,28.987579,3.0);
Ccp[playerid] = 1;
return 1;
}
return 0;
}

public OnPlayerEnterCheckpoint(playerid)
{
if(Ccp[playerid] == 1)
{
DisablePlayerCheckpoint(playerid);
Ccp[playerid] = 2;
SetPlayerCheckpoint(playerid,1029.829833,152.51452 6,29.566751,3.0);
}
if(Ccp[playerid] == 2)
{
DisablePlayerCheckpoint(playerid);
Ccp[playerid] = 3;
SetPlayerCheckpoint(playerid,946.965515,175.549880 ,31.342302,3.0);
}
if(Ccp[playerid] == 3)
{
DisablePlayerCheckpoint(playerid);
Ccp[playerid] = 4;
SetPlayerCheckpoint(playerid,909.895385,201.056076 ,32.546501,3.0);
}
if(Ccp[playerid] == 4)
{
DisablePlayerCheckpoint(playerid);
Ccp[playerid] = 5;
SetPlayerCheckpoint(playerid,701.218200,219.563552 ,26.110618,3.0);
}
if(Ccp[playerid] == 5)
{
DisablePlayerCheckpoint(playerid);
Ccp[playerid] = 6;
SetPlayerCheckpoint(playerid,518.209228,145.517745 ,23.537740,3.0);
}
if(Ccp[playerid] == 6)
{
DisablePlayerCheckpoint(playerid);
Ccp[playerid] = 7;
SetPlayerCheckpoint(playerid,523.288696,53.878677, 20.279356,3.0);
}
if(Ccp[playerid] == 7)
{
DisablePlayerCheckpoint(playerid);
Ccp[playerid] = 8;
SetPlayerCheckpoint(playerid,579.372436,-47.698345,21.331911,3.0);
}
if(Ccp[playerid] ==
{
DisablePlayerCheckpoint(playerid);
Ccp[playerid] = 9;
SetPlayerCheckpoint(playerid,691.816162,-25.689786,26.147438,3.0);
}
if(Ccp[playerid] == 9)
{
DisablePlayerCheckpoint(playerid);
Ccp[playerid] = 10;
SetPlayerCheckpoint(playerid,903.169677,0.213338,9 0.856170,3.0);
}
if(Ccp[playerid] == 10)
{
DisablePlayerCheckpoint(playerid);
Ccp[playerid] = 11;
SetPlayerCheckpoint(playerid,1064.725952,0.473035, 77.407127,3.0);
}
if(Ccp[playerid] == 11)
{
DisablePlayerCheckpoint(playerid);
Ccp[playerid] = 12;
SetPlayerCheckpoint(playerid,960.284790,-54.722476,77.577148,3.0);
}
if(Ccp[playerid] == 12)
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid,COLOR_YELLOW,"Sigxariti ria nikises Vraveio = 3000");
GivePlayerMoney(playerid,3000);
Ccp[playerid] = 0;
DestroyVehicle(playerid);
}
return 1;
}
// When I go to the first checkpoint it gives me the reward... why? Please tell me fast!
Reply
#29

The setplayermoney part is BAD. + There's no such native function.
Reply
#30

A ZCMD command should be outside of any callback.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    return 0;
}  

COMMAND:start(playerid, params[])//LINE 100 HERE
{
    if( IsPlayerInRangeOfPoint( playerid, 7.0, 1017.3148, -929.1449, 420.1316 ) ) // change the '1, 2, 3' to the coords for bigjump 1 (example)
    {
     SetPlayerVirtualWorld(playerid, 1);
     PutPlayerInVehicle(playerid, 411, 0);   // when the player is at bigjump 1, do this
    }
    if( IsPlayerInRangeOfPoint( playerid, 7.0, 1946.0314, -1921.3646, 584.5061 ) ) // change the '4, 5, 6' to the coords for bigjump 2 (example)
    {
        SetPlayerVirtualWorld(playerid, 2);
        PutPlayerInVehicle(playerid, 411, 0);
    }
    if( IsPlayerInRangeOfPoint( playerid, 7.0, 2312.9204, 986.5928, 501.5012 ) ) // change the '7, 8, 9' to the coords for driftplace 137 (example)
    {
        SetPlayerVirtualWorld(playerid, 3);
        PutPlayerInVehicle(playerid, 411, 0);
    }
    return 1;
}
Reply
#31

I think im using the wrong checkpoint as it shows a red blip on the minimap but nothing on the ground im after the small one not the massive on also it ist spawning me into the car.

Код:
public OnFilterScriptInit()
{
	CreateDynamicCP(1017.3148, -929.1449, 420.1316, 3, 0, 0, -1, 100.0);
	CreateDynamicCP(1946.0314, -1921.3646, 584.5061, 3, 0, 0, -1, 100.0);
	CreateDynamicCP(1017.3148, -929.1449, 420.1316, 3, 0, 0, -1, 100.0);
	return 1; 
}

Код:
}
	COMMAND:start(playerid, params[])
{
    if( IsPlayerInRangeOfPoint( playerid, 7.0, 1017.3148, -929.1449, 420.1316 ) ) // change the '1, 2, 3' to the coords for bigjump 1 (example)
    {
     SetPlayerVirtualWorld(playerid, 1);
	 PutPlayerInVehicle(playerid, 411, 0);   // when the player is at bigjump 1, do this
    }
    if( IsPlayerInRangeOfPoint( playerid, 7.0, 1946.0314, -1921.3646, 584.5061 ) ) // change the '4, 5, 6' to the coords for bigjump 2 (example)
    {
        SetPlayerVirtualWorld(playerid, 2);
        PutPlayerInVehicle(playerid, 411, 0);
    }
    if( IsPlayerInRangeOfPoint( playerid, 7.0, 2312.9204, 986.5928, 501.5012 ) ) // change the '7, 8, 9' to the coords for driftplace 137 (example)
    {
        SetPlayerVirtualWorld(playerid, 3);
        PutPlayerInVehicle(playerid, 411, 0);
    }
	return 1;
}
Reply
#32

pawn Код:
CreateDynamicCP(1017.3148, -929.1449, 420.1316, CHANGEME, 0, 0, -1, 100.0);
Change the 'CHANGEME' to the size you want. Im not sure, but i think 3.0/2.0 is a little one
Reply
#33

Still can get it to show up am i using the right one for the small red checkpoint on the floor ?
Reply
#34

Ooh wait, you want when you do /start, it shows a checkpoint that's in front of you?
pawn Код:
COMMAND:start(playerid, params[])
{
    if( IsPlayerInRangeOfPoint( playerid, 7.0, 1017.3148, -929.1449, 420.1316 ) ) // change the '1, 2, 3' to the coords for bigjump 1 (example)
    {
        SetPlayerVirtualWorld(playerid, 1);
        PutPlayerInVehicle(playerid, 411, 0);   // when the player is at bigjump 1, do this
        CreateDynamicCheckPoint(....);
    }
    if( IsPlayerInRangeOfPoint( playerid, 7.0, 1946.0314, -1921.3646, 584.5061 ) ) // change the '4, 5, 6' to the coords for bigjump 2 (example)
    {
        SetPlayerVirtualWorld(playerid, 2);
        PutPlayerInVehicle(playerid, 411, 0);
        CreateDynamicCheckPoint(....);
    }
    if( IsPlayerInRangeOfPoint( playerid, 7.0, 2312.9204, 986.5928, 501.5012 ) ) // change the '7, 8, 9' to the coords for driftplace 137 (example)
    {
        SetPlayerVirtualWorld(playerid, 3);
        PutPlayerInVehicle(playerid, 411, 0);
        CreateDynamicCheckPoint(....);
    }
    return 1;
}
Reply
#35

HI there i ust tried your quide but when i add it to my GM it just crashes the complier any ideas why?

http://pastebin.com/0UeG4jiz
Reply
#36

Quote:
Originally Posted by Wesley221
View Post
Tutorial about what? Currencly almost done with this one, but no idea about what my next will be
Thanks for the tutorial. It's great even though I still have problems :P
I'll fix it sooner or later.


Suggestion:

You should make a dynamic business system

/buybus
/sellbus
/enterbus
/exitbus


And every hour you'll get some money based on the price of the business.
Reply
#37

Quote:
Originally Posted by manchestera
Посмотреть сообщение
HI there i ust tried your quide but when i add it to my GM it just crashes the complier any ideas why?

http://pastebin.com/0UeG4jiz
This is not a copy-paste tutorial, try to read it and try again. If you got problems with errors just post that, but you should give it some time before asking for help
Reply
#38

can you update it and add a tut of a job
when you enter check it gives you "Object in hand" and gives other Cp to take the "Object" to next cp \
thanks
btw nice tut
Reply
#39

Very good tuto Thanks, I'll use it to make driving license and flying license

Give[rep]=++

Thank you and continue to make tutoral like that!
Reply
#40

Very nice
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)