I do not see my other checkpoint! - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: I do not see my other checkpoint! (
/showthread.php?tid=203662)
I do not see my other checkpoint! -
MonkZemun - 27.12.2010
I use gtarp mod.
Код:
if (strcmp(cmd, "/race", true)==0)//Ovdje stavite koju komandu zelite za prozivanje
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "KORISTITE: /race [ID/Ime]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
if(IsPlayerConnected(giveplayerid))
{
SetPlayerCheckpoint(giveplayerid, 2311.3074,-2203.4268,5.7850,8.0);// ovdje stavite kordinate prvog CP-a. ovo sto pise (8.0)To vaj je velicina CP-a.
CP[giveplayerid] = 900;
SendClientMessage(playerid, COLOR_BLUE, "Pozvan si na Race.");
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, " Niste autorizirani da koristite ovu komandu !");
}
}
return 1;
}
Код:
else if(CP[playerid] == 900) { CP[playerid] = 901; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 2134.9924,-2023.9802,7.7057,8.0); }//Ovdje idu kordinate 2 cp-a
else if(CP[playerid] == 901) { CP[playerid] = 902; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 1978.7404,-1866.4452,5.2941,8.0); }//Ovdje idu kordinate 3 cp-a
else if(CP[playerid] == 902) { CP[playerid] = 903; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 1787.8651,-1806.7468,3.7048,8.0); }//Ovdje idu kordinate 4 cp-a
else if(CP[playerid] == 903) { CP[playerid] = 904; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 1371.4023,-1712.1035,8.5829,8.0); }//zadnji cp
else if(CP[playerid] == 904)//Kraj Race-a
{
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s je upravo zavrsio Race. ", name);//Ovdje pise ko je zavrsio race
SendClientMessageToAll(COLOR_LIGHTRED, string);
DisablePlayerCheckpoint(playerid);
CP[playerid] = 0;
}
Re: I do not see my other checkpoint! -
Anthonyx3' - 27.12.2010
Do something like this:
pawn Код:
SetPlayerCheckpoint(playerid, rest of code);
Then onplayerentercheckpoint
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 3, checkpoint they entering coords))//entering first checkpoint
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_COLORHERE, "You've passed a checkpoint, speed up and get to the others!");
SetPlayerCheckpoint(playerid, Checkpoint info);
//rest of your codes
return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 3, checkpoint they entering coords))checkpoint 2
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_COLORHERE, "You've passed a checkpoint, speed up and get to the others!");
SetPlayerCheckpoint(playerid, Checkpoint info);
// Rest of your codes
return 1;
}