String problem
#1

Removed.
Reply
#2

Can you show the whole code please?
Reply
#3

Removed.
Reply
#4

On the command, object ID should be printed correctly. On the callback, you create the variable
pawn Код:
new objectmodel;
and then you print that! It will take a value of zero. Why don't you use objectid instead?
Reply
#5

Removed.
Reply
#6

What I mean is that in OnPlayerEditObject callback, you create "objectmodel" (by default, it gets the value 0) and then you print that so the value will be 0.
Reply
#7

Removed.
Reply
#8

By itself, it will not.
pawn Код:
CMD:test(playerid, params[])
{
    new objectmodel, car;
    new string[128];
    format(string, sizeof string, "You Have Added Object ID %d On Vehicle ID %d.", objectmodel, car);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    return 1;
}
It will print "You Have Added Object ID 0 On Vehicle ID 0".

Like I said before, creating a variable without assigning a value to it, it will get the value 0 by default. You need to assign the value of the object that you've stored somewhere.
Reply
#9

pawn Код:
format(string, sizeof(string), "You Have Attached Object ID %d In Array Slot %d Of Vehicle ID %d.", AttachingObjects[playerid], carslot, car);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
Reply
#10

Removed.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)