Small help with a stock
#1

I made this stock
pawn Код:
stock VehicleNameID(vehicleid)
{
    new carname[50];
    if(GetVehicleModel(vehicleid) == 560) { carname = "landstalker"; }
    return vehicleid;
}
This is suppose to return the car name into this
pawn Код:
new vehname = VehicleNameID(carkey1);
pawn Код:
format(string, sizeof(string), " 1є : (%s) | KEY: (%d)",vehname,carkey1);
It displayers the int carkey1 but the vehnam is not showing the name of the vehicle

What i did wrong in this code?
Reply
#2

pawn Код:
format(string, sizeof(string), " 1є : (%s) | KEY: (%d)",carname,carkey1);
Reply
#3

it worked im making tests i tryed make something similiar with this code
pawn Код:
new carname1[50];
            new carname2[50];
            new carname3[50];
            carname1 = vehicleinfo[carkey1][VehicleName];
            carname2 = vehicleinfo[carkey2][VehicleName];
            carname3 = vehicleinfo[carkey3][VehicleName];
            if(playerinfo[playerid][vkey1] != 0)
            {
                format(string, sizeof(string), " 1є : (%s) | KEY: (%d)",carname1,carkey1);
                SendClientMessage(playerid, COLOR_GREEN, string);
            }
But it is not working now
Reply
#4

It is querying alright and loading because the rest of the script works very good. What is wrong with it?

EDIT: At my field VehicleName in phpmyadmin it shows the name of the cars so its something wrong with my code
Reply
#5

Yes but i want it to load from my vehicleinfo[vehicleid][VehicleName] at vehicle with i use carkey1 = playerinfo[playerid][vkey1] for example and it is working alright until i made this /v list wich is not reading the VehicleName for some reason lol
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)