sscanf2 CELLMIN_ON_MATCHES
#2

Quote:
Originally Posted by ******
Посмотреть сообщение
You don't show how you declared "params".
i am using it as an command for testing how the system works

edit: sorry i missed to add [] in params it took me like 10 hours to figure it out :/ ok i want to ask how to set CELLMIN_ON_MATCHES globally

edit 2:
so i worked on script set the cellmin globally
pawn Код:
if (TargetID == cellmin)
    {
        foreach(Player,i) if(!strcmp(PlayerInfo[TargetID][pUserName],PlayerInfo[i][pUserName])){  TargetID=i; print("case 1");}
        else { print("case 2"); SendClientMessage(playerid,COLOR_ERROR,ERROR_MULTIPLE_MATCHES); }
    }
so this won't work command won't get executed and nothing in print
full command i will work on it its just testing now
pawn Код:
CMD:i(playerid,params[])
{
    new TargetID;
    if(!sscanf(params, "u", TargetID))
    {
    //if(TargetID == -1) return SendClientMessage(playerid,COLOR_ERROR,"Please Enter An Value");
    if (TargetID == cellmin)
    {
        foreach(Player,i) if(!strcmp(PlayerInfo[TargetID][pUserName],PlayerInfo[i][pUserName])){  TargetID=i; print("case 1");}
        else { print("case 2"); SendClientMessage(playerid,COLOR_ERROR,ERROR_MULTIPLE_MATCHES); }
    }
    else if (TargetID == INVALID_PLAYER_ID)
    {
        SendClientMessage(playerid,COLOR_ERROR,ERROR_INVALID_PLAYER);
    }
    else
    {
        new string[50];
        format(string,sizeof(string),"%d is the id of player.",TargetID);
        SendClientMessage(playerid,-1,string);
    }
    }else print("empty");
     return 1;
}
Reply


Messages In This Thread
sscanf2 CELLMIN_ON_MATCHES - by AroseKhanNiazi - 06.09.2014, 22:05
Re: sscanf2 CELLMIN_ON_MATCHES - by AroseKhanNiazi - 07.09.2014, 05:37
Re: sscanf2 CELLMIN_ON_MATCHES - by AroseKhanNiazi - 07.09.2014, 18:19
Re: sscanf2 CELLMIN_ON_MATCHES - by AroseKhanNiazi - 07.09.2014, 18:34
Re: sscanf2 CELLMIN_ON_MATCHES - by AroseKhanNiazi - 07.09.2014, 18:39

Forum Jump:


Users browsing this thread: 1 Guest(s)