SA-MP Forums Archive
What did I do wrong? - 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: What did I do wrong? (/showthread.php?tid=202731)



What did I do wrong? - propilot - 25.12.2010

Hey I scripted gps script but I can't see what I did wrong

pawn Код:
if(strcmp(cmd, "/isls", true) == 0)
   {
   SetPlayerCheckpoint(playerid, 1184.7054,-3702.7004,5.5726, 10.00);
}
if(strcmp(cmd, "/isle", true) == 0)
   {
   SetPlayerCheckpoint(playerid, 3708.5895,-1507.7553,8.3544, 10.00);

}
if(strcmp(cmd, "/islw", true) == 0)
   {
   SetPlayerCheckpoint(playerid, -3524.7919,1341.0784,4.1947, 10.00);

}
if(strcmp(cmd, "/isln", true) == 0)
   {
   SetPlayerCheckpoint(playerid, 382.2226,3591.6541,5.1390, 10.00);

}
if(strcmp(cmd, "/carls", true) == 0)
   {
   SetPlayerCheckpoint(playerid, 2719.5486,-2644.2388,23.6925, 10.00);

}
if (IsPlayerInCheckpoint(playerid))
{
  DisablePlayerCheckpoint(playerid);
}
when i go inside the check point it does not remove it stays...


Re: What did I do wrong? - [JnA]DukeNukem - 25.12.2010

try with doing it if (IsPlayerClose(playerid,10)==0) or CloseToPoint


Re: What did I do wrong? - SkizzoTrick - 25.12.2010

WOw this is a nooby question but read Wiki next time

You want it to get deleted?
pawn Код:
public OnPlayerEnterCheckpoint(...)
{
   if(IsPlayerInRangeOfPoint(playerid,10.0,1184.7054,-3702.7004,5.5726))
       {
        GameTextForPlayer(playerid,"Welcome to LS",5000,5);
        DisablePlayerCheckpoint(playerid);
       }
   if(IsPlayerInRangeOfPoint(playerid,10.0,3708.5895,-1507.7553,8.3544))
       {
        GameTextForPlayer(playerid,"Welcome to LE",5000,5);
        DisablePlayerCheckpoint(playerid);
       }//Just repeat this
return 1;
}
or if you want only deletion:

pawn Код:
public OnPlayerEnterCheckpoint(...)
{
   DisablePlayerCheckpoint(playerid);
return 1;
}



Re: What did I do wrong? - propilot - 25.12.2010

Quote:
Originally Posted by SkizzoTrick
Посмотреть сообщение
WOw this is a nooby question but read Wiki next time

You want it to get deleted?
pawn Код:
public OnPlayerEnterCheckpoint(...)
{
   if(IsPlayerInRangeOfPoint(playerid,10.0,1184.7054,-3702.7004,5.5726))
       {
        GameTextForPlayer(playerid,"Welcome to LS",5000,5);
        DisablePlayerCheckpoint(playerid);
       }
   if(IsPlayerInRangeOfPoint(playerid,10.0,3708.5895,-1507.7553,8.3544))
       {
        GameTextForPlayer(playerid,"Welcome to LE",5000,5);
        DisablePlayerCheckpoint(playerid);
       }//Just repeat this
return 1;
}
or if you want only deletion:

pawn Код:
public OnPlayerEnterCheckpoint(...)
{
   DisablePlayerCheckpoint(playerid);
return 1;
}
What should I add in the ... dots?
pawn Код:
public OnPlayerEnterCheckpoint(...)
{
   DisablePlayerCheckpoint(playerid);
return 1;
}



Re: What did I do wrong? - willsuckformoney - 25.12.2010

public OnPlayerEnterCheckpoint(playerid)

Sure its that, although I never used that callback.


Re: What did I do wrong? - propilot - 25.12.2010

Quote:
Originally Posted by willsuckformoney
Посмотреть сообщение
public OnPlayerEnterCheckpoint(playerid)

Sure its that, although I never used that callback.
Код:
C:\Users\Alex - Webhost\Desktop\Divinity Gaming Comunity\SA-MP\[SFP]Server For Pilots\gamemodes\sfp.pwn(9891) : error 029: invalid expression, assumed zero
C:\Users\Alex - Webhost\Desktop\Divinity Gaming Comunity\SA-MP\[SFP]Server For Pilots\gamemodes\sfp.pwn(9891) : error 004: function "Streamer_OnPlayerEnterCP" is not implemented
0_0