Why this doesnt work
#1

Hello everybody, i dont get something in my GM.
This isnt working:

if (!strcmp("/sumo", cmdtext, true))
{
SetPlayerPosWithVehicle(playerid, 3099.2480, -2135.2482, 16.9685, cmdtext);
return 1;
}

But this works:

if (!strcmp("/andromada", cmdtext, true))
{
SetPlayerPosWithVehicle(playerid, -1698.4584, -185.6152, 14.1484, 178.3117, cmdtext);
return 1;
}


I get error C:\Users\Giovanni\Desktop\Samp server\gamemodes\1.0.pwn(1422) : error 035: argument type mismatch (argument 5)

And this is line 1422;

SetPlayerPosWithVehicle(playerid, 3099.2480, -2135.2482, 16.9685, cmdtext);

Please help me, i cant fix it
Reply
#2

What is your SetPlayerPosWithVehicle function?
Reply
#3

Nothin its just this, its working on all. Only this one doesnt work.
Reply
#4

SetPlayerPosWithVehicle is not a native SA-MP function, so I can't help.
Reply
#5

LOL. Setplayerposwithvehicle is not a function, and even if it was, if it called cmdtext, it would teleport you with vehicle "/sumo" instead of a valid vehicleid.

lmao
Reply
#6

Sorry men, but im usin https://sampforum.blast.hk/showthread.php?tid=21250 but im building new things in it.
But why it works with other and not this things...
Reply
#7

your missing a number, look andromada, its( playerid F F F F text ) and your sumo only have 3 F not 4. the fourth number is probably the facing angle.
Reply
#8

Try:

Код:
if (!strcmp("/sumo", cmdtext, true))
{
SetPlayerPosWithVehicle(playerid, 3099.2480, -2135.2482, 16.9685, 0, (vehicle id!: e.g. 497));
return 1;
}

But this works:

if (!strcmp("/andromada", cmdtext, true))
{
SetPlayerPosWithVehicle(playerid, -1698.4584, -185.6152, 14.1484, 178.3117, 0, (vehicle id!: e.g. 497));
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)