SA-MP Forums Archive
Where could be a problem? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Where could be a problem? (/showthread.php?tid=160962)



Where could be a problem? - ikey07 - 18.07.2010

Where is prob?
pawn Код:
new VehicleNames[212][64] = {
{"Landstalker"},
{"Bravura"},
{"Buffalo"},
{"Linerunner"},
...

{"Farm Plow"}, //farmtr1
{"Utility Trailer"} //utiltr1
};


        new vehicleid = GetPlayerVehicleID(playerid);
    new vehid = GetVehicleModel(vehicleid);
    new cars[64];
        new car = 400-vehid;
        format(cars,sizeof(cars),"%s",VehicleNames[car]);
        GameTextForPlayer(playerid,cars, 3000, 1);

and its not Send me a car name when I enter in car.


Re: Where could be a problem? - [SVRPG]Falcon - 18.07.2010

If you told us what he problem is, maybe errors or something we could help you out.
I did see a problem.
Quote:
Originally Posted by ikey07
Посмотреть сообщение
Where is prob?
pawn Код:
new car = 400-vehid;
        format(cars,sizeof(cars),"%s",VehicleNames[car]);
        GameTextForPlayer(playerid,cars, 3000, 1);
It should be:

pawn Код:
new car = vehid-400;
Otherwise you get a negative number or 0.
But if you could give us your problem we could help.


Re: Where could be a problem? - ikey07 - 18.07.2010

EDIT: Problem solved, Ops I needed to use that vehid-400 , damn