SA-MP Forums Archive
when player reachs score? - 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: when player reachs score? (/showthread.php?tid=125424)



when player reachs score? - -Rebel Son- - 03.02.2010

I need help with a function, i made it for when a player hits a score of 500, it resets and the next round commence's.

Код:
  public ScoreReach()
  {
  if(GetPlayerScore(playerid) = 500)
	{
	SendClientMessageToAll(COLOR_RED,"game score reached!");
  SendRconCommand("GMX");
	}



Re: when player reachs score? - Torran - 03.02.2010

That should work..


Re: when player reachs score? - -Rebel Son- - 03.02.2010

i get these errors



Код:
D:\backup\Gamemodes\operationdeathmatch.pwn(191) : error 017: undefined symbol "playerid"
D:\backup\Gamemodes\***.pwn(191) : warning 215: expression has no effect
D:\backup\Gamemodes\***.pwn(191) : error 001: expected token: ";", but found ")"
D:\backup\Gamemodes\***.pwn(191) : error 029: invalid expression, assumed zero
D:\backup\Gamemodes\***.pwn(191) : fatal error 107: too many error messages on one line



Re: when player reachs score? - dice7 - 03.02.2010

OnPlayerDeath, after the all SetPlayerScore
pawn Код:
if(GetPlayerScore(killerid) == 500)
{
  SendClientMessageToAll(COLOR_RED,"game score reached!");
  SendRconCommand("GMX");
}



Re: when player reachs score? - akis_tze - 03.02.2010

try this
Код:
public ScoreReach()
{
  if(GetPlayerScore(playerid) == 500)
	{
	SendClientMessageToAll(COLOR_RED,"game score reached!");
  SendRconCommand("GMX");
  return 1;
	}
	
}



Re: when player reachs score? - -Rebel Son- - 03.02.2010

Quote:
Originally Posted by KotZ
try this
Код:
public ScoreReach()
{
  if(GetPlayerScore(playerid) == 500)
	{
	SendClientMessageToAll(COLOR_RED,"game score reached!");
  SendRconCommand("GMX");
  return 1;
	}
	
}
KotZ i love you.