teleport commands for players names?
#8

Quote:
Originally Posted by Naruto_Emilio
Посмотреть сообщение
Strcmp is a good way aswell if you dont want to make a dynamic system but if I was you I would stick with strcmp if there is only 3 people that I want to make private if its more I wiuld stick with y_Ini and i cant post examples cause I am connected via my phone leave a msg on my pm and I will help sou tomorrow
Or just make a stock function using strfind in the playername? Example:

pawn Код:
stock findName(playerid)
    {
        new pname[MAX_PLAYER_NAME];
        else if(strfind(pname,"PUTNAMEHERE",true) != (-1)) return 0;
    }
Then you'd just write:
pawn Код:
if(findName(playerid)) // then wrap everything inside it then: else return SendClientMEssage(playerid, -1, "You dont have permission to use this");
inside of the function it'll do the same thing There are many ways of doing this, I prefer strfind than to strcmp, because strcmp compares different strings, strfind just finds it if you put a correct definitive on it
Reply


Messages In This Thread
teleport commands for players names? - by kaos999 - 15.08.2013, 00:20
Re : teleport commands for players names? - by Naruto_Emilio - 15.08.2013, 01:15
Re: Re : teleport commands for players names? - by kaos999 - 15.08.2013, 01:24
Re: teleport commands for players names? - by Lyksus - 15.08.2013, 01:56
Re: Re : teleport commands for players names? - by Lyksus - 15.08.2013, 02:00
Re: teleport commands for players names? - by Legend_Of_War - 15.08.2013, 02:05
Re: teleport commands for players names? - by Naruto_Emilio - 15.08.2013, 02:10
Re: teleport commands for players names? - by Lyksus - 15.08.2013, 02:50

Forum Jump:


Users browsing this thread: 1 Guest(s)