Unit numbers
#7

I don't know your /d and /r commands, also I don't know if you know - but you have your own brain! Yes, it comes free at birth. Use it sometimes.

pawn Код:
enum UnitData {
    uname[5]
}
static Units[MAX_VEHICLES][UnitData];

//Creation of unit
new vid = CreateVehicle(...);
new name[5];
format(name, sizeof name, "E%03d", vid);
strcat(Units[vid][uname], name);

//Retrieving example
new vid = GetPlayerVehicleID(playerid);
new msg[24];
if('\0' != Units[vid][uname][0]) {
    format(msg, sizeof msg, "Hello from unit %s", Units[vid][uname]);
    SendClientMessage(playerid, -1, msg);
}
Reply


Messages In This Thread
Unit numbers - by firemanjv - 24.02.2013, 12:37
Re: Unit numbers - by Misiur - 24.02.2013, 12:50
Re: Unit numbers - by Vince - 24.02.2013, 13:07
Re: Unit numbers - by firemanjv - 24.02.2013, 13:10
Re: Unit numbers - by Misiur - 24.02.2013, 13:14
Re: Unit numbers - by firemanjv - 24.02.2013, 13:23
Re: Unit numbers - by Misiur - 24.02.2013, 13:29
Re: Unit numbers - by firemanjv - 24.02.2013, 13:36

Forum Jump:


Users browsing this thread: 1 Guest(s)