Jump to content

Sistem masina


Daedric-Fox

Recommended Posts

Baieti, cum as putea face un sistem..cat mai simplu incepatorii, care se inregistreaza pe server la level 1 sa primeasca un faggio, la level  un huntley si la level 20 un elegy, ma gandesc ca ar putea fi ceva de genul:

CMD:v(playerid, params[])
{
ShowPlayerDialog(playerid, DIALOG_TUTORIAL, DIALOG_STYLE_LIST, "Vehicule tutorial", "Spawneaza Vehiculul\nDespawwneaza Vehiculul\nGaseste Vehiculul", "OK", "Cancel");
}

OnDialogResponse
{
    if(dialogid == DIALOG_TUTORIAL)
    {
        if(listitem == 0)
        {
        //aici ce trebuie pus ca sa o spawneze,o sa incerc sa ma mai gandesc maine...
        }
        if(listitem == 1)
        {
        //aici ca sa o despawneze..(aici chiar nu stiu.:))
        }
        if(listitem == 2)
        {
        //aici cred ca e relativ usor...
        }
    }
}

Bun..dar acum alta e problema...cum fac sa se seteze automat o masina fiecarui player care se inregistreaza pe server...Ce am facut mai sus e doar jumate din sistem..cred ca nici atat...O sa ma mai gandesc maine ca sunt obosit si revin cu un edit daca imi mai vine vreo idee, dar cine poate sa ma ajute daca vrea..

Edited by DaEdRiC-FoX

**********************************

Servicii Scripting de calitate:

*********************************

Future Project: ExpertGame

*********************************

Link to comment
Share on other sites

Sa iti explic,faci un:

if(PlayerInfo[playerid][pLevel] >= 1)
{
    SendClientMessage(playerid, -1, "Intre level 1-20 ai spawnat un vehicul de tutorial si anume un fagio.");
    CreateVehicle(id car,x,y,z...);
}

Deci pe scurt,faci o verificare daca playerul are level mai mare sau = ca 1.

Cat despre dialog vine.

if(dialogid == DIALOG_TUTORIAL)
    {
        if(listitem == 0)
        {
        //Spawn vehicle,adica dai CreateVehicle(cars, x,y,z,...);
        }
        if(listitem == 1)
        {
        //DestroyVehicle(id car,......);
        }
        if(listitem == 2)
        {
        //RespawnCar(id car,x,y,z....);
        }

 

Edited by Adrian_Petre
  • Upvote 1

 

 

Link to comment
Share on other sites

Da este un gamemode mysql

@Adrian_Petre  Unde pun acel if ?

 

Edited by DaEdRiC-FoX

**********************************

Servicii Scripting de calitate:

*********************************

Future Project: ExpertGame

*********************************

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.