Need help ! ^^
#1

FIRST HELP :
pawn Код:
COMMAND:moveafk(playerid, params[])
{
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xDEEE20FF, "You not in RCON.");
    new gsendid;
    new string[256];
    new str[256];
    new PlayerName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,PlayerName,sizeof(PlayerName));
    if(sscanf(params, "u",gsendid))return SendClientMessage(playerid,COLOR_LIGHTRED, "Usage: {CC0099}/moveafk [ID]");
    else if(gsendid == INVALID_PLAYER_ID)return SendClientMessage(playerid, COLOR_LIGHTRED, "{9999CC}Player not found!");
    else
    {
        TogglePlayerControllable(playerid, 0);
        GetPlayerName(playerid, sendername, sizeof(sendername));
        format(str, sizeof(str), "INFO: %s is puted AFK by admin .", sendername);
        SendClientMessageToAll(COLOR_BRIGHTRED, str);
        SendClientMessage(playerid, COLOR_WHITE, "Admin put you AFK. Use /back to come back in the game.");
        SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(playerid) + 123);
        LoopingAnim(playerid,"BEACH", "bather", 4.0, 1, 0, 0, 0, 0);
        AFK[playerid] = 1;
        format(string, sizeof(string), "~w~ADMIN PUT ~b~YOU ~r~AFK");
        GameTextForPlayer(playerid, string, 5000, 3);
        PlayerPlaySound(playerid, 1076, 0.0, 0.0, 0.0);
        SetPlayerAttachedObject(playerid, SLOT, 18645, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
    }
    if(AFK[playerid] == 0)
    {
        SendClientMessage(playerid, COLOR_WHITE, "He is AFK. He need to use /back.");
        return 1;
    }
    return 1;
}
I want like admin can put you in afk, but when i use that CMD, i go afk, but i want that, like admin can put you afk .

Second help .
I make cmd like /zombiec, /zombiek, /zombied . Now i want to make that all in dialog, but, i dont know, how i can type ID, in dialog . 1 cmd is like that :
pawn Код:
COMMAND:zombiec(playerid, params[])
{
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xDEEE20FF, "You not in RCON.");
    new gsendid;
    new string[256];
    new PlayerName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,PlayerName,sizeof(PlayerName));
    if(sscanf(params, "u",gsendid))return SendClientMessage(playerid,Color_Red, "Usage: {CC0099}/zombiec [ID]");
    else if(gsendid == INVALID_PLAYER_ID)return SendClientMessage(playerid, Color_Red, "{9999CC}Player not found!");
    else
    {
        format(string,sizeof(string),"Admin %s {3333FF}has make | NEW CHAINSAW ZOMBIE |!{663333} Watch color on map!",PlayerName);
        SendClientMessageToAll(COLOR_LIGHTBLUE,string);
        format(string, sizeof(string), "~w~We have ~b~new~y~[]CHAINSAW ZOMBIE]");
        GameTextForAll( string, 5000, 3 );
        ResetPlayerWeapons(playerid);
        GivePlayerWeapon(gsendid, 9, 999);
        Zombie[ playerid ] = Create3DTextLabel("{33FF66}I'M{FF3300} CHAINSAW {6633FF}ZOMBIE.",-1,30.0,40.0,50.0,40.0,0);
        Attach3DTextLabelToPlayer( Zombie[ playerid ], playerid, 0.0, 0.0, 0.7);
        SetPlayerHealth(gsendid, 999);
        SetPlayerColor(gsendid, 0xFF6600AA);
        SetPlayerSkin(gsendid, 137);
        Delete3DTextLabel( Knife[ playerid ] );
        Delete3DTextLabel( Dildo[ playerid ] );
        Delete3DTextLabel( Shovel[ playerid ] );
    }
    return 1;
}
Now, i maked CMD :
pawn Код:
COMMAND:zombie(playerid, params[])
{
    SendClientMessage(playerid, 0xFFFFFFFF, "Choose, what zombie you want .");
    ShowPlayerDialog(playerid, 9990, DIALOG_STYLE_LIST, "Zombies", "Zombie with chainsaw\nZombie with knife\nZombie with dildo\nZombie help","Make", "Cancel");
    return 1;
}
Then i make dialog, like that :

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 9990)
    {
        if(response)
        {
          if(listitem == 0)//ZombieC
            {
                new Str[128];
                ShowPlayerDialog(playerid, 9991,DIALOG_STYLE_INPUT,"Type ID!", Str, "Zombie","Cancel");
            }
And next dialog like that :
pawn Код:
if(dialogid == 9991)
    {
        if(response)
        {
            new gsendid;
            new string[256];
            new PlayerName[MAX_PLAYER_NAME];
            GetPlayerName(playerid,PlayerName,sizeof(PlayerName));
            if ( !sscanf( inputtext, "u", inputtext[ 0 ] ) )
            if(gsendid == INVALID_PLAYER_ID)return SendClientMessage(playerid, Color_Red, "{9999CC}Player not found!");
            else
            {
                format(string,sizeof(string),"Admin %s {3333FF}has make | NEW CHAINSAW ZOMBIE |!{663333} Watch color on map!",PlayerName);
                SendClientMessageToAll(COLOR_LIGHTBLUE,string);
                format(string, sizeof(string), "~w~We have ~b~new~y~[]CHAINSAW ZOMBIE]");
                GameTextForAll( string, 5000, 3 );
                ResetPlayerWeapons(playerid);
                GivePlayerWeapon(gsendid, 9, 999);
                Zombie[ playerid ] = Create3DTextLabel("{33FF66}I'M{FF3300} CHAINSAW {6633FF}ZOMBIE.",-1,30.0,40.0,50.0,40.0,0);
                Attach3DTextLabelToPlayer( Zombie[ playerid ], playerid, 0.0, 0.0, 0.7);
                SetPlayerHealth(gsendid, 999);
                SetPlayerColor(gsendid, 0xFF6600AA);
                SetPlayerSkin(gsendid, 137);
                Delete3DTextLabel( Knife[ playerid ] );
                Delete3DTextLabel( Dildo[ playerid ] );
                Delete3DTextLabel( Shovel[ playerid ] );
            }
            return 1;
        }
        return 0;
    }
Thats not correct, i know, because i ask help
PLZ HELP WITH ALL ... I am beginner, and SRY ABOUT BAD ENGLISH !

AND PS: I MAKED THAT IN FS !
Reply


Messages In This Thread
Little Dialog Help :D - by Gertin - 07.03.2011, 14:53
Re: Need help ! ^^ - by Scrip - 07.03.2011, 15:06
Re: Need help ! ^^ - by Gertin - 07.03.2011, 15:37
Re: Need help ! ^^ - by GaGlets(R) - 07.03.2011, 15:57
Re: Need help ! ^^ - by Gertin - 07.03.2011, 16:11
Re: Need help ! ^^ - by Gertin - 08.03.2011, 11:43
Re: Need help ! ^^ - by Stigg - 08.03.2011, 11:46
Re: Need help ! ^^ - by Gertin - 08.03.2011, 12:01
Re: Need help ! ^^ - by GaGlets(R) - 08.03.2011, 14:37
Re: Need help ! ^^ - by Gertin - 08.03.2011, 15:56

Forum Jump:


Users browsing this thread: 2 Guest(s)