SA-MP Forums Archive
PlayerTeam Problem - Has no effect - 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: PlayerTeam Problem - Has no effect (/showthread.php?tid=74682)



PlayerTeam Problem - Has no effect - nickbugun - 25.04.2009

Код:
 if(GetPlayerTeam(playerid) == 0)
 	{
	(TeamName[playerid],128,"Mafia");
	return 1;
	}
It gives me this error:
(321) : warning 215: expression has no effect
Help?


Re: PlayerTeam Problem - Has no effect - [nl]daplayer - 25.04.2009

Quote:
Originally Posted by nickbugun
Код:
 if(GetPlayerTeam(playerid) == 0)
 	{
	(TeamName[playerid],128,"Mafia");
	return 1;
	}
It gives me this error:
(321) : warning 215: expression has no effect
Help?
what are you trying to do here?
are you trying to set the String 'TeamName[playerid]' naar "Mafia"?

then you need to use strmid


Re: PlayerTeam Problem - Has no effect - Andom - 25.04.2009

Try:
Код:
strmid(TeamName[playerid], "Mafia", false, strlen("Mafia"), 32);



Re: PlayerTeam Problem - Has no effect - nickbugun - 25.04.2009

I want to do if the player chose class "0" then he will be assigned with the mafia team.


Re: PlayerTeam Problem - Has no effect - [nl]daplayer - 25.04.2009

This will work to i think:

pawn Код:
if(GetPlayerTeam(playerid) == 0)
{
    format(TeamName[playerid],128,"Mafia");
    return 1;
}
But i think strmid is faster then format