SA-MP Forums Archive
Race system - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Race system (/showthread.php?tid=292874)



Race system - wumpyc - 25.10.2011

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)


Re: Race system - HuSs3n - 25.10.2011

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


Re: Race system - wumpyc - 26.10.2011

Anyone have idea how would i make that?


Re: Race system - Ely - 26.10.2011

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);



Re: Race system - wumpyc - 26.10.2011

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


Re: Race system - wumpyc - 26.10.2011

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