29.07.2011, 14:41
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:
Copy the function above on the top of your script and do:
...You can also get YSI and include y_utils, I recommend that option.
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)
pawn Код:
strcpy(CarInfo[carid][owner], ownername, MAX_PLAYER_NAME);