Race system
#1

Hey im making race system..And i want to add that you can build races at game...
PHP код:
CMD:addcheckpoint(playerid,params[])
{
    if (
IsPlayerAdmin(playerid) == && PlayerMakingRace[playerid] == 1)
    {
    
SendClientMessage(playeridCOLOR_GREEN,"Checkpoint Added!");
    
SendClientMessage(playeridCOLOR_GREEN,"Use /stopmakerace when you finish adding checkpoints");
    new 
Float:x,Float:y,Float:z,File:cpoint fopen("Checkpoints.txt"io_write),cckpoint[200];
    
GetPlayerPos(playerid,x,y,z);
    
format(cckpoint,sizeof(cckpoint),"SetPlayerRaceCheckpoint(playerid,2,%d,%d,%d,0,0,0,3);\r\n",x,y,z);
    
fwrite(cpoint,cckpoint);
    
fclose(cpoint);
    
SetPlayerRaceCheckpoint(playerid,2,x,y,z,0,0,0,3);
    
CheckpointAdded[playerid] = 1;
    }
    return 
1;

How can i make that on every /addcheckpoint new checkpoint will be placed and all of them appear when i /startrace ...PLEASE HELP ME...ILL GIVE YOU A REP(OFC)
Reply
#2

you cant place more than one checkpoint without a streamer https://sampwiki.blast.hk/wiki/Limits
Reply
#3

Anyone have idea how would i make that?
Reply
#4

Quote:
Originally Posted by wumpyc
Посмотреть сообщение
Anyone have idea how would i make that?
Use Incognito's Streamer https://sampforum.blast.hk/showthread.php?tid=102865

And Use This To Make Checkpoints Using His Streamer

Код:
CreateDynamicCP(Float:x, Float:y, Float:z, Float:size, worldid = -1, interiorid = -1, playerid = -1, Float:distance = 100.0);
And The Call

Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid);
Reply
#5

wtf why on in checkpoints.txt i get
PHP код:
SetPlayerRaceCheckpoint(playerid,2,-992562295,-987281283,1111142273,0,0,0,3); 
?
Reply
#6

Oh... thank you ******..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)