different spawn location for clan - 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: different spawn location for clan (
/showthread.php?tid=192838)
different spawn location for clan -
audifan00 - 23.11.2010
hey, I had this code but i lost it..
basecly, if player has [EDT] tag in front of his name, set his position somewhere else than other people spawn.
i tried this:
Quote:
if (strcmp("[EDT]",pname, true) == 0)
{
SendClientMessageToAll(COLOR_WHITE, "Member Of [EDT] Has Joined!");
SetPlayerPos(playerid,-394.2638,1521.8910,76);
}
|
but its not part of name, its full name i know, but how do i detect part of name same way?
I had this code before long time ago :/...
Re: different spawn location for clan -
randomkid88 - 23.11.2010
You can use strfind. It searches in a string instead of comparing two separate strings.
pawn Код:
if(strfind(pname, "[EDT]", true) != -1)
{
//code
}
Hope this helps