[?]Getting Vehicle id NOT model
#1

Can someone give me Command or give tips creating one.
/getvehid and it displays vehicle id.

Already searched through didnt find anything useful.

Thank you.
Reply
#2

pawn Код:
if (strcmp("/getvehid", cmdtext, true, 10) == 0)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            new string[128];
            format(string, 128, "Vehid: %d", GetPlayerVehicleID(playerid));
            SendClientMessage(playerid, 0xB4B5B7FF, string);
        }
        else
        {
            return SendClientMessage(playerid, 0xB4B5B7FF, "Your not in any vehicle!");
        }
        return 1;
    }
Reply
#3

Quote:
Originally Posted by Pandabeer1337
if (strcmp("/getvehid", cmdtext, true, 10) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
new string[128];
format(string, 128, "Vehid: %d", GetPlayerVehicleID(playerid));
SendClientMessage(playerid, 0xB4B5B7FF, string);
}
else
{
return SendClientMessage(playerid, 0xB4B5B7FF, "Your not in any vehicle!");
}
return 1;
}
Код:
warning 219: local variable "string" shadows a variable at a preceding level
on this line
Код:
new string[128];
Still i can use it?

i will ignore that warning
Reply
#4

just remove
pawn Код:
new string[128];
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)