strfind else if
#1

Hello
i have problem, my players can even use the /iloveyou command which is for me only

i add a checking system which checks if the player who use the command is Romel but its not working
code

pawn Код:
CMD:iloveyou(playerid, params[])
{
    new str[128];
    if(strfind(GetpName(playerid), "Romel", false) != -1)
    {
        format(str, sizeof(str), "LOVE: %s(%d) says I Love You", GetpName(playerid), playerid);
        SendClientMessageToAll(COLOR_YELLOW, str);
        SendClientMessage(playerid, COLOR_GREEN, "*** You said I Love You ***");
    }
    else if(strfind(GetpName(playerid), "Katy", false) != -1)
    {
        format(str, sizeof(str), "LOVE: %s(%d) says I Love You to Romel", GetpName(playerid), playerid);
        SendClientMessageToAll(COLOR_YELLOW, str);
        SendClientMessage(playerid, COLOR_GREEN, "*** You said I Love You to Romel ***");
    }
    else return SendClientMessage(playerid, COLOR_RED, "*** You are not Katy/Romel ***");
    return 1;
}
Reply


Messages In This Thread
strfind else if - by JaKe Elite - 23.07.2012, 05:31
Re: strfind else if - by Kindred - 23.07.2012, 06:59
Re: strfind else if - by ikey07 - 23.07.2012, 07:10
Re: strfind else if - by JaKe Elite - 23.07.2012, 07:11
Re: strfind else if - by JaKe Elite - 23.07.2012, 07:22
Re: strfind else if - by Kindred - 23.07.2012, 07:24
Re: strfind else if - by JaKe Elite - 23.07.2012, 07:26
Re: strfind else if - by Kindred - 23.07.2012, 07:27
Re: strfind else if - by ikey07 - 23.07.2012, 07:29
Re: strfind else if - by JaKe Elite - 23.07.2012, 07:32

Forum Jump:


Users browsing this thread: 1 Guest(s)