Spawn car working in zcmd but dialog.
#1

Hello. I've made a dialog menu where a player can spawn a car. I click on the car but it won't spawn. but if i do it via zcmd, the car will spawn and the code is exactly the same.

BTW i've noticed that Textdraws won't show up. The only one that works is just the welcome message.. http://pastebin.com/pBywnj73
Reply
#2

At dialog you have checked if the player's team i grove street so if you are not in gove street you wont the the vehicle
Код:
if(gTeam[playerid] == GroveStreet)
                {
and at command you haven't done that.
Reply
#3

So, my problem is that my gm doesn't check the team?

Quote:

SetPlayerTeamFromClass(playerid, classid)
{
if(classid == 105 || classid == 106 || classid == 107 || classid == 269 || classid == 270 || classid == 271)
{
gTeam[playerid] = GroveStreet;
}
else if(classid == 102 || classid == 104 || classid == 105)
{
gTeam[playerid] = Ballas;
}

}

Reply
#4

No the problem is that you wasnt in Grove Street team.

Код:
 if(dialogid == Auto)
    {
        switch(listitem)
        {
            case 0:
            {

                    new Float:x, Float:y, Float:z, Float:a;
                    GetPlayerPos(playerid, x,y,z);
                    GetPlayerFacingAngle(playerid, a);
                    CreateVehicle(562, x+3,y,z, a, Verde, Verde, -1);
                    printf("Auto Spawnata");
                    PutPlayerInVehicle(playerid, 562, 0);
             }
             case 1:
                {
                    new Float:x, Float:y, Float:z, Float:a;
                    GetPlayerPos(playerid, x,y,z);
                    GetPlayerFacingAngle(playerid, a);
                    CreateVehicle(562, x+3,y,z, a, Viola, Viola, -1);
                    printf("Auto Spawnata");
                    PutPlayerInVehicle(playerid, 562, 0);
                }
            }
    return 1;
    }
test this and tell me
Reply
#5

It spawns the car but in my dialog we have 3 cars: Elegy, Bullet and Sultan. We have two teams. If a grove street member spawn the car it should be Green (Verde) and if is a ballas member it should be Purple (Viola) :\
Reply
#6

Well
Your old codes should work just set your team to Grove street or ballas.
if doesnt work test this..

http://paste2.org/tP8183x6
Reply
#7

Fixed

Quote:

new veh = CreateVehicle(562, x+3,y,z, a, Viola, Viola, -1);
printf("Auto Spawnata");
PutPlayerInVehicle(playerid, veh, 0);

Thanks for ur support
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)