[help] Car's system respawn problem
#4

Sorry for late response, but I think I know that problem as well: you're using strcat when you're copying the owner name, so it won't work like you want if the array isn't empty.

Use strcpy by ****** instead (this function is from y_utils include which comes with YSI), it makes sure the destination will be empty before you start copying the text:
pawn Код:
#define strcpy(%0,%1,%2) \
    strcat((%0[0] = '\0', %0), %1, %2)
Copy the function above on the top of your script and do:
pawn Код:
strcpy(CarInfo[carid][owner], ownername, MAX_PLAYER_NAME);
...You can also get YSI and include y_utils, I recommend that option.
Reply


Messages In This Thread
[help] Car's system respawn problem - by Dirkon - 24.07.2011, 14:29
Re: [help] Car's system respawn problem - by Finn - 24.07.2011, 15:26
Re: [help] Car's system respawn problem - by Dirkon - 25.07.2011, 09:49
Re: [help] Car's system respawn problem - by Finn - 29.07.2011, 14:41

Forum Jump:


Users browsing this thread: 1 Guest(s)