Vehicle Dialog Help!
#1

Hi i maked a vehicle dialog but when i spawn a car i want to be in the car and the player may only spawn one car.Example:
I spawn a ca r and i am in it but when i spawn her again i want to be in the car and just one car to spawn.
How please tell?
Reply
#2

pawn Code:
new CurrentVeh[MAX_PLAYERS];

// Under onplayerconnect
CurrentVeh[playerid] = -1;

//under your spawn cmd
//spawn ( playerid, params )
CurrentVeh[playerid] = CreateVehicle
Now to check if the player already spawned an vehicle :

pawn Code:
if(CurrentVeh[playerid] == -1) // The player hasnt spawned any veh.
Reply
#3

Where to put new CurrentVeh[MAX_PLAYERS];
Reply
#4

Quote:
Originally Posted by IvancheBG
View Post
Where to put new CurrentVeh[MAX_PLAYERS];
Where your other symbols are at
Reply
#5

ok it sends error

C:\Documents and Settings\user\Desktop\server samp\gamemodes\test.pwn(370 -- 371) : error 076: syntax error in the expression, or invalid function call
Reply
#6

Show me those lines
Reply
#7

This is under on player connect

Code:
CreateObject(3269, 1749.684082, -2559.906250, 13.370020, 0.0000, 0.0000, 0.0000);
    CreateObject(13641, 1798.133179, -2596.736572, 14.266119, 0.0000, 0.0000, 0.0000);
    CreateObject(13604, 1815.301514, -2561.565918, 14.254892, 0.0000, 0.0000, 0.0000);
    CreateObject(12956, 1607.663818, -2451.933105, 16.382927, 0.0000, 0.0000, 0.0000);
    CreateObject(6052, 1557.625000, -2631.130615, 15.294515, 0.0000, 0.0000, 0.0000);
    CreateObject(4656, 1484.029907, -2487.649414, 17.886879, 0.0000, 0.0000, 0.0000);
    CreateObject(1634, 1481.170410, -2562.911865, 26.759121, 0.0000, 0.0000, 170.9235);
    CreateObject(1634, 1464.752197, -2561.237061, 26.812862, 0.0000, 0.0000, 170.9235);
    CreateObject(969, -1346.568115, 479.319458, 6.354377, 0.0000, 0.0000, 279.2130);
    CreateObject(969, -1344.629150, 481.604736, 6.354377, 0.0000, 0.0000, 0.0000);
    CreateObject(969, -1338.749756, 434.110657, 6.354377, 0.0000, 0.0000, 0.0000);
    CreateObject(969, -1329.626465, 434.094482, 6.354377, 0.0000, 0.0000, 0.0000);
    CreateObject(969, -1321.019775, 433.961548, 6.354377, 0.0000, 0.0000, 0.0000);
    CreateObject(969, -1311.996826, 433.985718, 6.354377, 0.0000, 0.0000, 0.0000);
    CreateObject(969, -1303.237671, 434.070007, 6.354377, 0.0000, 0.0000, 0.0000);
    CreateObject(969, -1294.200317, 434.112000, 6.354377, 0.0000, 0.0000, 0.0000);
    CreateObject(969, -1285.134277, 434.110352, 6.354377, 0.0000, 0.0000, 0.0000);
    CreateObject(969, -1276.280273, 433.951904, 6.354377, 0.0000, 0.0000, 0.0000);
    CreateObject(969, -1267.354248, 434.065613, 6.354377, 0.0000, 0.0000, 0.0000);
    CreateObject(969, -1258.429565, 434.109070, 6.354377, 0.0000, 0.0000, 0.0000);
    CreateObject(969, -1249.541748, 434.066772, 6.354377, 0.0000, 0.0000, 0.0000);
    CreateObject(969, -1240.696899, 434.120850, 6.354377, 0.0000, 0.0000, 0.0000);
    CreateObject(969, -1240.696899, 434.120850, 6.354377, 0.0000, 0.0000, 0.0000);
    CreateObject(969, -1231.933105, 434.222626, 6.347794, 0.0000, 0.0000, 15.4699);
    CreateObject(969, -1223.442749, 436.590637, 6.354377, 0.0000, 0.0000, 73.9115);
    CreateObject(969, -1221.317627, 445.072998, 6.354377, 0.0000, 0.0000, 94.5380);
    CreateObject(969, -1221.893799, 453.471405, 6.354377, 0.0000, 0.0000, 0.0000);
    CreateObject(969, -1220.900879, 453.517670, 6.354377, 0.0000, 0.0000, 88.5219);
    CreateObject(969, -1220.555420, 462.358795, 6.354377, 0.0000, 0.0000, 97.1163);
    CreateObject(969, -1221.762817, 469.241516, 6.354377, 0.0000, 0.0000, 136.6505);
    CreateObject(969, -1228.020508, 475.189941, 6.354377, 0.0000, 0.0000, 137.5099);
    CreateObject(980, -1240.759888, 481.650970, 8.960892, 0.0000, 0.0000, 0.0000);
    CreateObject(980, -1252.278198, 481.628326, 8.960892, 0.0000, 0.0000, 0.0000);
    CreateObject(980, -1263.945068, 481.613922, 8.960892, 0.0000, 0.0000, 0.0000);
    CreateObject(980, -1275.409058, 481.388641, 8.960892, 0.0000, 0.0000, 0.0000);
    CreateObject(980, -1287.071777, 481.394714, 8.960892, 0.0000, 0.0000, 0.0000);
    CreateObject(980, -1298.484009, 481.519958, 8.960892, 0.0000, 0.0000, 0.0000);
    CreateObject(980, -1309.152344, 481.379639, 8.960892, 0.0000, 0.0000, 0.0000);
    CreateObject(980, -1320.770508, 481.341156, 8.960892, 0.0000, 0.0000, 0.0000);
    CreateObject(980, -1332.258545, 481.510315, 8.960892, 0.0000, 0.0000, 0.0000);
    CreateObject(980, -1343.641479, 481.365143, 8.960890, 0.0000, 0.0000, 0.0000);
    CreateObject(980, -1349.246582, 475.481445, 8.960892, 0.0000, 0.0000, 91.1002);
    CreateObject(980, -1348.501953, 464.042328, 8.960892, 0.0000, 0.0000, 96.2569);
    CreateObject(980, -1347.113647, 452.354492, 8.960892, 0.0000, 0.0000, 96.2569);
    CreateObject(980, -1338.792480, 437.266174, 9.220301, 0.0000, 0.0000, 89.3814);
    CreateObject(980, -1333.036255, 434.147125, 12.529253, 0.0000, 0.0000, 180.4820);
    CreateObject(980, -1321.643066, 433.981873, 12.385839, 0.0000, 0.0000, 180.4820);
    CreateObject(980, -1310.095093, 434.402832, 12.610867, 0.0000, 0.0000, 180.4820);
    CreateObject(980, -1298.356201, 435.226776, 12.825809, 0.0000, 0.0000, 180.4820);
    CreateObject(980, -1287.022461, 434.524078, 12.454308, 0.0000, 0.0000, 180.4820);
    CreateObject(980, -1275.792847, 434.090454, 12.410892, 0.0000, 0.0000, 180.4820);
    CreateObject(980, -1264.265747, 434.247559, 12.429304, 0.0000, 0.0000, 180.4820);
    CreateObject(980, -1252.748779, 434.369568, 12.504313, 0.0000, 0.0000, 180.4820);
    CreateObject(980, -1229.640503, 434.631287, 12.454306, 0.0000, 0.0000, 186.4982);
    CreateObject(980, -1241.056152, 434.202118, 12.354305, 0.0000, 0.0000, 180.4820);
    CreateObject(980, -1221.180298, 440.380463, 12.210892, 0.0000, 0.0000, 247.5183);
    CreateObject(980, -1220.663208, 451.446960, 12.210892, 0.0000, 0.0000, 263.8475);
    CreateObject(980, -1221.397949, 462.817627, 12.460892, 0.0000, 0.0000, 278.4577);
    CreateObject(980, -1223.503052, 469.762207, 12.460892, 0.0000, 0.0000, 311.9755);
    CreateObject(980, -1232.127319, 477.817322, 11.960890, 1.7189, 0.0000, 330.8829);
    CreateObject(980, -1242.371338, 481.609802, 14.404377, 1.7189, 0.0000, 359.2441);
    CreateObject(980, -1263.977051, 481.572754, 14.238756, 1.7189, 0.0000, 359.2441);
    CreateObject(980, -1253.912109, 481.587158, 14.486509, 1.7189, 0.0000, 359.2441);
    CreateObject(980, -1297.376099, 480.409302, 14.210602, 1.7189, 0.0000, 0.1036);
    CreateObject(980, -1287.274170, 481.353546, 14.454994, 1.7189, 0.0000, 359.2441);
    CreateObject(980, -1275.822754, 481.347473, 14.505878, 1.7189, 0.0000, 359.2441);
    CreateObject(980, -1320.135620, 481.299988, 14.484430, 0.0000, 0.0000, 354.0875);
    CreateObject(980, -1306.090942, 481.338470, 14.326921, 0.0000, 0.0000, 356.6658);
    CreateObject(980, -1343.520752, 481.323975, 14.460707, 0.0000, 0.0000, 1.8225);
    CreateObject(980, -1331.697876, 481.469147, 14.410763, 0.0000, 0.0000, 357.5252);
    CreateObject(980, -1349.213135, 475.885956, 14.135775, 0.0000, 0.0000, 95.3974);
    CreateObject(980, -1348.484253, 464.258545, 14.428900, 0.0000, 0.0000, 93.7821);
    CreateObject(980, -1346.249756, 454.681122, 15.107450, 0.0000, 0.0000, 93.7821);
    SendClientMessage(playerid, 0x7BDDA5AA, "SERVER: Welcome To Our Server,Have Fun!");
    CurrentVeh[playerid] = -1;
Reply
#8

Show me line (370 -- 371) Or just pastebin your script.
Reply
#9

here is line 370 371

Code:
if(!strcmp(cmdtext, "/v", true))
	{
        CurrentVeh[playerid] = CreateVehicle
        ShowPlayerDialog(playerid, vmenu, DIALOG_STYLE_LIST, "Vehicles", "Infernus \nNRG-500 \nBF Injection", "Spawn", "Cancel");
        return 1;
Reply
#10

CurrentVeh[playerid] = CreateVehicle Should be at the dialog response and

CreateVehicle shouldnt be CreateVehicle.. it should be CreateVehilce( PARAMS from the dialog here);
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)