different spawn location for clan
#1

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 :/...
Reply
#2

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)