Jump to content

Recommended Posts

Posted

Cu checkpointuri poti face aproape tot ce vrei

Cum ar fi:

  • Teleporturi
  • Sa ii dea bani unui player
  • Sa ii dea score unui player
  • Setezi un skin sau multe altele

Checkpointurile sunt de 2 feluri

  • Checkpoint Normal
  • Race Checkpoint

Checkpointul normal se creeaza cu functia

  • SetPlayerCheckpoint(playerid,Float:x,Float:y,Float:z,Float:size);


SetPlayerCheckpoint - Creeaza checkpointul
playerid - .....
Float:x - Seteaza coordonata X a checkpointului
Float:y - Seteaza coordonata Y a checkpointului
Float:z - Seteaza coordonata Z a checkpointului
Float:size - Marimea checkpointului

Ex:
[pawn]SetPlayerCheckpoint(playerid,2523.4235,7467.3256,2562.5413,4.0);[/pawn]

Checkpointul de race se creeaza cu functia
  • SetPlayerRaceCheckpoint(playerid,type,Float:x,Float:y,Float:z,Float:nextx,Float:nexty,Float:nextz,Float:size);

SetPlayerRaceCheckpoint - Creeaza checkpointul

playerid - .....

Type - Eu nu sunt chiar sigur la ce ajuta type:D

Float:x - Seteaza coordonata X a checkpointului

Float:y - Seteaza coordonata Y a checkpointului

Float:z - Seteaza coordonata Z a checkpointului

Float:nextx - Pozitia X a urmatorului Checkpoint

Float:nexty - Pozitia Y a urmatorului Checkpoint

Float:nextz - Pozitia Z a urmatorului Checkpoint

Float:size - Marimea checkpointului

Ex:

[pawn]SetPlayerRaceCheckpoint(playerid,0,4325.4325,6646.3244,5262.6335,3526.6354,2343.3524,2353.3245,8.0);[/pawn]

Exemplu de script :

[pawn]

#include <a_samp>

new Point[MAX_PLAYERS];

public OnPlayerSpawn(playerid)

{

    SetPlayerCheckpoint(playerid,5242.3255,4235.5232,7435.4252,5);

    Point[playerid] = 1;

    return 1;

}

public OnPlayerEnterCheckpoint(playerid)

{

    if(Point[playerid] == 1)

    { 

          SetPlayerPos(playerid,5462.3252,3256.5325,7563.6334);

          SetPlayerHealth(playerid,100);

          GivePlayerMoney(playerid,1000);

    }

    return 1;

}[/pawn]

Sper ca ati inteles cam cum functioneaza cu checkpointurile..

Cred ca voi face un toturial cum se face un DMV sistem

Pentru a va arata cum se creeaza "o reactie in lant" a checkpointurilor

Massari e curva mea

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.