strfind help
#3

Hello!

Write it in the following way:
PHP код:
case 32..35:
{
    new 
name[MAX_PLAYER_NAME];
    
SetPlayerPos(playerid,2752.8835,-2513.6389,25.7914);
     
SetPlayerCameraPos(playerid,2753.1050,-2519.0244,26.6926);
      
SetPlayerCameraLookAt(playerid,2752.8835,-2513.6389,25.7914);
       
SetPlayerFacingAngle(playerid,180.0);
       
GameTextForPlayer(playerid,"~y~[RESTRICTED] Central Intelligence Agency",3000,3);
       
ApplyAnimation(playerid,"GYMNASIUM","GYMshadowbox",4.0,1,1,1,1,1);
       
GetPlayerName(playerid,name,sizeof name);
       if(
strfind(name,"[CIA]",true) != -1)
       {
           
SendClientMessage(playeridHOODLUMS_COLOR"You have spawned as an official Central Intelligence Agency clan member.");
         return 
1;
       }

You have forgot to read out the name with GetPlayerName.

Mencent
Reply


Messages In This Thread
strfind help - by nicholasramdhan - 11.04.2015, 14:12
Re: strfind help - by Konstantinos - 11.04.2015, 14:14
AW: strfind help - by Mencent - 11.04.2015, 14:16

Forum Jump:


Users browsing this thread: 1 Guest(s)