command involving strcmp
#1

Hello,

i tried to make this command, but it doesn't work.
My knowledge about strcmp is not big.
Can someone tell me what i did wrong here?
thanks

PHP код:
COMMAND:quicklogin(playeridparams[])
{
    new 
tmp[5];
    if(!
Player[playerid][Authed]) return SendClientError(playerid"Something went wrong - you're not logged in.");
    if(
sscanf(params"s" ,tmp)) return SendClientUsage(playerid"[ info / enable / disable / addlocation / dellocation ]");
    if(!
strcmp(tmp"enable"true5))
    {
    
SendClientMessage(playerid,-1,"{FFFFFF}[{6f757d}SR Quicklogin{FFFFFF}] Quicklogin has been enabled!"
    
SendClientMessage(playerid,-1,"{FFFFFF}[{6f757d}SR Quicklogin{FFFFFF}] You now don't have to use a password anymore!");
    
Player[playerid][quicklogin] = 1;
    }
    if(!
strcmp(tmp"disable"true5))
    {
    
SendClientMessage(playerid,-1,"{FFFFFF}[{6f757d}SR Quicklogin{FFFFFF}] Quicklogin has been disabled!"
    
SendClientMessage(playerid,-1,"{FFFFFF}[{6f757d}SR Quicklogin{FFFFFF}] You have to use a password now if you login!");
    
Player[playerid][quicklogin] = 0;
    }
    if(!
strcmp(tmp"addlocation"true5))
    {
    
SendClientMessage(playerid,-1,"{FFFFFF}[{6f757d}SR Quicklogin{FFFFFF}] Current location has been added for quicklogin!");
    }
    return 
1;

OWOW i didnt close them with );

......................................
sorry for my stupid me LOL
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)