How to change Walk Style and Creteobject
#1

Okey i use the Grandlarnce gamemode and i need to change so i walk like CJ..
And! can you help me i want to createobject in game i rcon logged in. In Rcon
Reply
#2

#1.
Код:
public OnGameModeInit()
{
    UsePlayerPedAnims();
    return 1;
}
Reply
#3

Thanks. and how can i make objects in game
Reply
#4

https://sampwiki.blast.hk/wiki/CreateObject
Reply
#5

You want with saving it or without saving? I will give you an example in saving and loading fighting styles and you could use the same as that... In your waling styles!
So yeah here will be code under OnDialogReponse:
pawn Код:
if (dialogid == fighting)
    {
        if (response)
        {
            if (listitem == 0)
            {
                SetPlayerFightingStyle (playerid, FIGHT_STYLE_NORMAL);
                pInfo[playerid][Fighting] = 0;
                SendClientMessage(playerid, COLOUR_LIGHTBLUE, "You have changed your fighting style to - Normal");
            }
            if (listitem == 1)
            {
                SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING);
                pInfo[playerid][Fighting] = 1;
                SendClientMessage(playerid, COLOUR_LIGHTBLUE, "You have changed your fighting style to - Boxing");
            }
            if (listitem == 2)
            {
                pInfo[playerid][Fighting] = 2;
                SendClientMessage(playerid, COLOUR_LIGHTBLUE, "You have changed your fighting style to - KungFu");
            }
            if (listitem == 3)
            {
                SetPlayerFightingStyle (playerid, FIGHT_STYLE_KNEEHEAD);
                pInfo[playerid][Fighting] = 3;
                SendClientMessage(playerid, COLOUR_LIGHTBLUE, "You have changed your fighting style to - Knee Head");
            }
            if (listitem == 4)
            {
                SetPlayerFightingStyle (playerid, FIGHT_STYLE_GRABKICK);
                pInfo[playerid][Fighting] = 4;
                SendClientMessage(playerid, COLOUR_LIGHTBLUE, "You have changed your fighting style to - Grab Kick");
            }
            if (listitem == 5)
            {
                SetPlayerFightingStyle (playerid, FIGHT_STYLE_ELBOW);
                pInfo[playerid][Fighting] = 5;
                SendClientMessage(playerid, COLOUR_LIGHTBLUE, "You have changed your fighting style to - Elbow");
            }
        }
        else
        {
            SendClientMessage(playerid, COLOUR_LIGHTBLUE, "You selected 'cancel'");
        }
    }
Now we need loading: public OnPlayerSpawn(playerid)
pawn Код:
if(pInfo[playerid][Fighting] == 0)
    {
        SetPlayerFightingStyle (playerid, FIGHT_STYLE_NORMAL);
    }
    if(pInfo[playerid][Fighting] == 1)
    {
        SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING);
    }
    //etc etc etc!
Only remember to create on enum Fighting and in rest of saving loading code..

like: new Fighting;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)