How do I make a spawn car command? And more. read topic please.
#1

How do I make a spawn car command? Like, when they type /vehicle, a dialog box will show up showing the names of cars then they will pick a car they want to spawn?


And, how do I add something to the persons name like, on world 2, roleplay world, I wanna add something like, when they talk, "Carl_Johnson Says: Hello."

But It only applys on world 2
The spawn car command only on world 1
Because world 0 is for the DM world
Reply
#2

pawn Код:
if(!strcmp(cmd, "/vec", true))
    {
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, COLOR_WHITE, "Use: /vec [voertuig ID]");
            return 1;
        }
        new vecid = strval(tmp);
        if(vecid >= 400 && vecid <= 611)
        {
         
                new Float:pX, Float:pY, Float:pZ, Float: pA;
                GetPlayerPos(playerid, pX, pY, pZ); GetPlayerFacingAngle(playerid, pA);

                CreateVehicle(vecid, pX, pY, pZ, pA, -1, -1, 900);
               
               
                SendClientMessage(playerid, COLOR_RED, string);
                return 1;
            }
       
        else
        {
            SendClientMessage(playerid, COLOR_RED, "Wrong vehicle ID");
        }
        return 1;
    }
Just a simple /vec command
Reply
#3

Thanks but I want a dialog box to appear, then players will choose what car they want then press "OK"
Reply
#4

You have to make a really huge array with all the cars and names so you can categorize em and list them in the box.
Reply
#5

https://sampwiki.blast.hk/wiki/ShowPlayerDialog
Reply
#6

Quote:
Originally Posted by Mystique
Посмотреть сообщение
You aren't helping at all, I know how to make a DIALOG BOX, But I can't make a code to spawn vehlces
Reply
#7

Oh, sorry.
Reply
#8

Didn't you try to search on sa-mp forum Vehicle FS'S?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)