GTA Közösség - A magyar GTA fórum
San Andreas Multiplayer (SA-MP) => SA-MP: Szerverfejlesztés => Segítségkérés => A témát indította: kriszrap - 2010. március 13. - 11:30:06
-
Szaisztok egy olyan chekpointot kérnék hogy ne csak egyet tudjak lerakni hanem töbet is pl 3, 4et egy bank chekpointot csinálok
és egyszer sikerült csak csak egyet mutatot a játék és tom hogy van olyan ha pl 2 méter re vagy tole akkor be kapcsolodik a chekpoint pl fuels system script nél és ha rámennek a chekpointra akkor ki irjon egy szöveget . légy szí segítsetek
-
Keress CP Streamert
-
hát nem mentem sokra CP Streamertel ha tud valaki segíteni meg tudná irni mait kértem?
és mi az a checkCoords mert nem tom?
-
ezt használtam és nem jelenik meg a chekpoint
new CurrentCP[MAX_PLAYERS];
forward CP_Update();
OnGameModeInit();.
SetTimer(\"CP_Update\",250,1);
#define MAX_POINTS 1
#define bank 0
new Float:Checkpoints[MAX_POINTS][4] =
{
{2001.3132,1538.6012,13.5859,4.0}
};
new Float:CheckpointCoords[MAX_POINTS][4] =
{
{2001.3132,1538.6012,13.5859,4.0}
};
new CheckpointArray[MAX_POINTS] =
{
bank
};
public CP_Update()
{
for(new i = 0; i < MAX_PLAYERS; i ++)
{
for(new j = 0; j < MAX_POINTS; j ++)
{
if(IsPlayerInCheckpointArea(i,CheckpointCoords[j]))
{
if(CurrentCP != j)
{
DisablePlayerCheckpoint(i);
SetPlayerCheckpoint(i,Checkpoints[j][0],Checkpoints[j][1],Checkpoints[j][2],Checkpoints[j][3]);
CurrentCP = j;
}
}
else
{
if(CurrentCP == j)
{
DisablePlayerCheckpoint(i);
CurrentCP = -1;
}
}
}
}
}
stock CheckpointID(playerid)
return CheckpointArray[CurrentCP[playerid]];
stock IsPlayerInCheckpointArea(playerid, Float:data[4])
{
new Float:c_x, Float:c_y, Float:c_z;
GetPlayerPos(playerid, c_x, c_y, c_z);
if(c_x >= data[0] && c_x <= data[2] && c_y >= data[1] && c_y <= data[3]) {
return 1;
}
return 0;
}
public OnPlayerEnterCheckpoint(playerid)
{
switch(CheckpointID(playerid))
{
case bank: {
SendClientMessage(playerid, COLOR_YELLOW, \"You are at an ATM. To store money use \'/bank amount\', to withdraw\");
SendClientMessage(playerid, COLOR_YELLOW, \"money use \'/withdraw amount\', and \'/balance\' to see your balance.\");
}
}
}
-
http://forum.sa-mp.com/index.php?topic=69459.0
Letöltés:
http://www.failai.lt/ekv1mh06rd5t/cpsinc.inc.htm
-
#include <a_samp>
#include <cpsinc>
#define COLOR_GREEN 0x33AA33AA
new bank;
forward chekpoint();
public OnPlayerEnterStreamedCheckpoint(playerid, streamid)
{
if(streamid == bank)
{
CreateCheckpoint(playerid,2001.3132,1538.6012,13.5859, 10.0, 200.0);
SendClientMessage(playerid, COLOR_GREEN,\"Bank parancsok:/bank [pénz] =Pénz Berakása\");
SendClientMessage(playerid, COLOR_GREEN,\"/withdraw =Pént Kiveszed /balance =A Tatisztikádat Tod Meg.\");
}
return 1;
}
igy próbáltam és nem ment vaze nem tom miért?
-
Használd már a
-t mer így nem áttekintheto és a szabályzatban is benne van! :@
A problémád csak az, hogy a CheckpointCoords és a Checkpoints ugyanaz, nekem is hasonlóan van megoldva, de én a PlayerToPoint függvényt is használom.
Segítség: http://www.sa-mp.hu/index.php/topic,285.0.html
-
és lenne még egy kérdésem hogy lehet olyant csinálni hogy 12 percenként meg jelenin egy chekpoint. És ha 1 percig legyen ott? és ha belle mennek akkor mutassa hogy mikor tünik el a chekpoint és ha eltünik akkor be megy pl. dm be
ha ezt le irja valaki azzal sokat segítene