http://wiki.sa-mp.com/wiki/OnPlayerEnterCheckpoint
public OnPlayerSpawn(playerid)// játékos le spannolása{ SetPlayerCheckpoint(playerid, 1982.6150, -220.6680, -0.2432, 3.0); chekpoint lerakás return 1;}public OnPlayerEnterCheckpoint(playerid) ha a játékos a Checkpointba van akkor ez fog történi (összes chekpoint){ CreateVehicle(520, 1982.6150, -221.0145, -0.2432, 82.2873, -1, -1, 60000);//kocsi lerakás DisablePlayerCheckpoint(playerid);// Checkpoint eltüntetése return 1;}
#include <a_samp>#include <zcmd>#define cp 0new gPlayerCheckpointStatus[MAX_PLAYERS];CMD:cp1(playerid,params[]){SetPlayerCheckpoint(playerid,-210.4612,987.3130,19.1967,5.0); // Ez a CPreturn 1;} public OnPlayerEnterCheckpoint(playerid){switch(gPlayerCheckpointStatus[playerid]) {case cp: {SendClientMessage(playerid,0x00CC00AA,\"Felvettél egy checkpointot!\");} }return 1;}
#include <a_samp>#include <zcmd>#define cp 0new gPlayerCheckpointStatus[MAX_PLAYERS];CMD:cp1(playerid,params[]){SetPlayerCheckpoint(playerid,-210.4612,987.3130,19.1967,5.0); // Ez a CPreturn 1;} public OnPlayerEnterCheckpoint(playerid){switch(gPlayerCheckpointStatus[playerid]) {case cp: {SendClientMessage(playerid,0x00CC00AA,\"Felvettél egy checkpointot!\");} }return 1;} Lehet hogy nem mûködik, teszteld le!
CMD:cp1(playerid,params[]){ SetPlayerCheckpoint(playerid,-210.4612,987.3130,19.1967,5.0); // Ez a CP SetPVarInt(playerid, \"CP\", 1 ); return 1;}CMD:cp2(playerid,params[]){ SetPlayerCheckpoint(playerid,-210.4612,987.3130,19.1967,5.0); // Ez a 2 CP SetPVarInt(playerid, \"CP\", 2 ); return 1;}public OnPlayerEnterCheckpoint(playerid){ if(GetPVarInt(playerid, \"CP\") == 1 ) { SendClientMessage(playerid,0x00CC00AA,\"Felvetted a checkpointot!\"); SetPVarInt(playerid, \"CP\", 0 ); } if(GetPVarInt(playerid, \"CP\") == 2 ) { SendClientMessage(playerid,0x00CC00AA,\"Felvetted a 2 checkpointot!\"); SetPVarInt(playerid, \"CP\", 0 ); } return 1;}
de azzal az összes cp eltüntetem!!!ja megSetPVarInt(playerid, \"CP\", 1);hogy tudom le nulázni szerver kapcsolodásnál??
public OnPlayerConnect(playerid){ SetPVarInt(playerid, \"CP\", 0);}