strfind
#1

pawn Код:
new name[24];
GetPlayerName(playerid,name,sizeof name);
if(strfind(name,"Jacket",true) != -1)
{
   SendClientMessage(playerid,0xFFFFCCFF,"Welcome back Boss.");
}
Ok , but if my name is Jacketx , i recive this message too why ?

All names started with Jacket recive that message, why?
Reply
#2

use strcmp
Reply
#3

Maybe because jacket starts with the names
uhh

maybe you can use an
{
else
}
??
Reply
#4

Quote:
Originally Posted by Μαστερμινδ
use strcmp
oh yea
Reply
#5

strfind finds a string from another string so if you have dthdhJacketsgrgrs it also sends true
Reply
#6

i think you have to change the strfind by strcmp
cuz strfind will check the player name
if there is Ja... it send the message
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)