[?]Getting Vehicle id NOT model - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [?]Getting Vehicle id NOT model (
/showthread.php?tid=73001)
[?]Getting Vehicle id NOT model -
dafel2 - 12.04.2009
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.
Re: [?]Getting Vehicle id NOT model -
Think - 12.04.2009
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;
}
Re: [?]Getting Vehicle id NOT model -
dafel2 - 12.04.2009
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
Still i can use it?
i will ignore that warning
Re: [?]Getting Vehicle id NOT model -
Think - 12.04.2009
just remove