Special nickname problem..
#1

if(strcmp(cmd, "/command", true) == 0)
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
if(strfind(pName,"David", true) != -1){
for(new i=0; i<=15; i++){ SendClientMessage(playerid, -1, "Do not nick David!"); }

// function

}
return 1;
}

Command does not work properly.
Reply
#2

Do it like this:

PHP код:
if(strcmp(cmd"/command"true) == 0)
{
    new 
pName[MAX_PLAYER_NAME];
    
GetPlayerName(playeridpNameMAX_PLAYER_NAME);
    if(
strcmp(pName,"David") != 0) return SendClientMessage(playerid, -1"Do not nick David!");
    
//function
    
return 1;

Reply
#3

Thanks, worked.
Reply


Forum Jump:


Users browsing this thread: