Reserved Cars - 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: Reserved Cars (
/showthread.php?tid=477245)
Reserved Cars -
ReD_DeVi - 23.11.2013
i want to know that how can i make reserved cars if you know please help me
Thank You!
Re: Reserved Cars -
xxRichixx - 23.11.2013
Hope it helps
pawn Код:
ifVEHICLENAMEHERE(vehicleid) = PlayerInfo[playerid]pINFO])
{
new Float:pos[3];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
SendClientMessage(playerid, COLOR_RED, " This vehicle is restricted to ______");
Re: Reserved Cars -
ReD_DeVi - 23.11.2013
but were i should copy paste
When i copy paste it showed error the error
Код:
C:\Documents and Settings\Administrator\Desktop\My Own Server !\pawno\include\zcmd.inc(90) : warning 219: local variable "pos" shadows a variable at a preceding level
C:\Documents and Settings\Administrator\Desktop\My Own Server !\gamemodes\SBX.pwn(1897) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\My Own Server !\gamemodes\SBX.pwn(1900) : error 021: symbol already defined: "GetPlayerPos"
C:\Documents and Settings\Administrator\Desktop\My Own Server !\gamemodes\SBX.pwn(1903) : warning 203: symbol is never used: "pos"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
Re: Reserved Cars - Patrick - 23.11.2013
[i]This code is not special, but this shows you how to create a
Reserved Vehicle System[Static]
pawn Код:
new ReservedCar[1] //create a variable
public OnGameModeInit()
{
ReservedCar[0] = CreateVehicle( ... ); //Vehicle Position & Stuff
return true;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(ispassenger) return 0;
if(vehicleid == ReservedCar[0])
{
if(!strcmp(name, "Your_Name", true))
{
SendClientMessage(playerid, -1, #Permission Granted, You may drive this vehicle around.);
}
else
{
SendClientMessage(playerid, -1, #Permission Denied, You may not drive this vehicle around.);
}
}
return true;
}
Re: Reserved Cars -
ReD_DeVi - 23.11.2013
Thank You.!