SA-MP Forums Archive
Copcar issue - 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)
+--- Thread: Copcar issue (/showthread.php?tid=397908)



Copcar issue - UnknownGamer - 07.12.2012

pawn Код:
CMD:copcar(playerid, params[])
{
    copcar[MAX_VEHICLES] = CreateVehicle(420,1749.0494,-1860.6791,13.2702,270.6886,0, 1,30000);
    return 1;
}
How would I make that work, I'm getting error must be indexed?


Re: Copcar issue - [D]ry[D]esert - 07.12.2012

At top of your game put this
pawn Код:
new copcar[MAX_PLAYERS];
then
pawn Код:
copcar[playerid] = CreateVehicle(420,1749.0494,-1860.6791,13.2702,270.6886,0, 1,30000);



Re: Copcar issue - UnknownGamer - 07.12.2012

Quote:
Originally Posted by [D]ry[D]esert
Посмотреть сообщение
At top of your game put this
pawn Код:
new copcar[MAX_PLAYERS];
then
pawn Код:
copcar[playerid] = CreateVehicle(420,1749.0494,-1860.6791,13.2702,270.6886,0, 1,30000);
I need it; so when I spawn a copcar, it knows its owned by the LSPD. When I spawn another one, it says its owned by state then?

anyone know a fix?


Re: Copcar issue - DaRk_RaiN - 07.12.2012

pawn Код:
if(GetVehicleModel(596) || GetVehicleModel(599))
{
SendClientMessage(playerid, COLOR_RED, "Owned by LSPD.");
}
else
{
SendClientMessage(playerid, COLOR_RED, "Owned by The State.");
}