SA-MP Forums Archive
i need car only rcon or admin can use - 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: i need car only rcon or admin can use (/showthread.php?tid=111062)



i need car only rcon or admin can use - matdav - 29.11.2009

hi, i need an system wich lock the car i want to for using it with only rcon or admin ( in ladmin4v2) so i can creat an admin island .
thx for the help


Re: i need car only rcon or admin can use - jonybomb - 29.11.2009

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if (vehicleid == CARID && !ispassenger)
{
if (IsPlayerAdmin(playerid)
{
SendClientMessage(playerid,COLOR_WHITE, "*Nice car.");
}
else
{
new Float:Xx,Float:Yy,Float:Zz,Float:Aa;
GetPlayerPos(playerid,Xx,Yy,Zz);
GetPlayerFacingAngle(playerid,Aa);
SetPlayerPos(playerid,Xx,Yy,Zz);
SetPlayerFacingAngle(playerid,Aa);
SendClientMessage(playerid,COLOR_WHITE, "*Walk.");

}


Re: i need car only rcon or admin can use - matdav - 29.11.2009

dont work got many error


Re: i need car only rcon or admin can use - jonybomb - 29.11.2009

what error? And put your vehicle id in "CARID"...


Re: i need car only rcon or admin can use - matdav - 29.11.2009

Код:
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamemodes\new.pwn(104) : error 001: expected token: ")", but found "{"
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamemodes\new.pwn(105) : error 017: undefined symbol "COLOR_WHITE"
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamemodes\new.pwn(107) : warning 217: loose indentation
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamemodes\new.pwn(110) : warning 217: loose indentation
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamemodes\new.pwn(114) : error 017: undefined symbol "COLOR_WHITE"
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamemodes\new.pwn(118) : warning 217: loose indentation
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamemodes\new.pwn(118) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamemodes\new.pwn(118) : error 004: function "OnPlayerExitVehicle" is not implemented
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamemodes\new.pwn(123) : warning 225: unreachable code
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamemodes\new.pwn(123) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamemodes\new.pwn(123) : error 004: function "OnPlayerStateChange" is not implemented
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamemodes\new.pwn(128) : warning 225: unreachable code
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamemodes\new.pwn(128) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamemodes\new.pwn(128) : error 004: function "OnPlayerEnterCheckpoint" is not implemented
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamemodes\new.pwn(133) : warning 225: unreachable code
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamemodes\new.pwn(133) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamemodes\new.pwn(133) : error 004: function "OnPlayerLeaveCheckpoint" is not implemented
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamemodes\new.pwn(138) : warning 225: unreachable code
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamemodes\new.pwn(138) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamemodes\new.pwn(138) : error 004: function "OnPlayerEnterRaceCheckpoint" is not implemented
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamemodes\new.pwn(143) : warning 225: unreachable code
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamemodes\new.pwn(143) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamemodes\new.pwn(143) : error 004: function "OnPlayerLeaveRaceCheckpoint" is not implemented
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamemodes\new.pwn(148) : warning 225: unreachable code
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamemodes\new.pwn(148) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamemodes\new.pwn(148) : error 004: function "OnRconCommand" is not implemented
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamemodes\new.pwn(153) : warning 225: unreachable code
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamemodes\new.pwn(153) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamemodes\new.pwn(153) : error 004: function "OnPlayerRequestSpawn" is not implemented
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamemodes\new.pwn(158) : warning 225: unreachable code
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamemodes\new.pwn(158) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamemodes\new.pwn(158) : error 004: function "OnObjectMoved" is not implemented
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamemodes\new.pwn(163) : warning 225: unreachable code
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamemodes\new.pwn(163) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamemodes\new.pwn(163) : error 004: function "OnPlayerObjectMoved" is not implemented
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamemodes\new.pwn(168) : warning 225: unreachable code
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamemodes\new.pwn(168) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamemodes\new.pwn(168) : error 004: function "OnPlayerPickUpPickup" is not implemented
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamemodes\new.pwn(173) : warning 225: unreachable code
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamemodes\new.pwn(173) : error 029: invalid expression, assumed zero

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


26 Errors.



Re: i need car only rcon or admin can use - jonybomb - 29.11.2009

Don't know why, you put the script in public function? I think you already have public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) and you put that again


Re: i need car only rcon or admin can use - matdav - 29.11.2009

i have replace OnPlayerEnterVehicle by your


Re: i need car only rcon or admin can use - Ironboy500 - 29.11.2009

26 errors. Missing bracket.


Re: i need car only rcon or admin can use - [NYRP]Mike. - 29.11.2009

Add this at the top of the script:
pawn Код:
new AdminCar;
Add this under OnGameModeInit / OnFilterScriptInit:
pawn Код:
AdminCar = AddStaticVehicleEx(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:angle, color1, color2, respawn_delay);
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if (vehicleid == AdminCar && !ispassenger)
  {
   if(IsPlayerAdmin(playerid))
   {
      SendClientMessage(playerid,COLOR_WHITE, "Drive safe & set a good example!");
   }
else
{
new Float:Xx,Float:Yy,Float:Zz,Float:Aa;
     GetPlayerPos(playerid,Xx,Yy,Zz);
     GetPlayerFacingAngle(playerid,Aa);
     SetPlayerPos(playerid,Xx,Yy,Zz);
     SetPlayerFacingAngle(playerid,Aa);
     SendClientMessage(playerid,COLOR_WHITE, "You Can't drive this Vehicle!");

    }



Re: i need car only rcon or admin can use - matdav - 30.11.2009

C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamem odes\new.pwn(144) : warning 217: loose indentation
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamem odes\new.pwn(147) : warning 217: loose indentation
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamem odes\new.pwn(156) : warning 217: loose indentation
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamem odes\new.pwn(156) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamem odes\new.pwn(156) : error 004: function "OnPlayerExitVehicle" is not implemented
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamem odes\new.pwn(161) : warning 225: unreachable code
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamem odes\new.pwn(161) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamem odes\new.pwn(161) : error 004: function "OnPlayerStateChange" is not implemented
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamem odes\new.pwn(166) : warning 225: unreachable code
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamem odes\new.pwn(166) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamem odes\new.pwn(166) : error 004: function "OnPlayerEnterCheckpoint" is not implemented
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamem odes\new.pwn(171) : warning 225: unreachable code
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamem odes\new.pwn(171) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamem odes\new.pwn(171) : error 004: function "OnPlayerLeaveCheckpoint" is not implemented
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamem odes\new.pwn(176) : warning 225: unreachable code
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamem odes\new.pwn(176) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamem odes\new.pwn(176) : error 004: function "OnPlayerEnterRaceCheckpoint" is not implemented
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamem odes\new.pwn(181) : warning 225: unreachable code
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamem odes\new.pwn(181) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamem odes\new.pwn(181) : error 004: function "OnPlayerLeaveRaceCheckpoint" is not implemented
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamem odes\new.pwn(186) : warning 225: unreachable code
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamem odes\new.pwn(186) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamem odes\new.pwn(186) : error 004: function "OnRconCommand" is not implemented
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamem odes\new.pwn(191) : warning 225: unreachable code
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamem odes\new.pwn(191) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamem odes\new.pwn(191) : error 004: function "OnPlayerRequestSpawn" is not implemented
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamem odes\new.pwn(196) : warning 225: unreachable code
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamem odes\new.pwn(196) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamem odes\new.pwn(196) : error 004: function "OnObjectMoved" is not implemented
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamem odes\new.pwn(201) : warning 225: unreachable code
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamem odes\new.pwn(201) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamem odes\new.pwn(201) : error 004: function "OnPlayerObjectMoved" is not implemented
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamem odes\new.pwn(206) : warning 225: unreachable code
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamem odes\new.pwn(206) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamem odes\new.pwn(206) : error 004: function "OnPlayerPickUpPickup" is not implemented
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamem odes\new.pwn(211) : warning 225: unreachable code
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamem odes\new.pwn(211) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamem odes\new.pwn(211) : error 004: function "OnVehicleMod" is not implemented
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamem odes\new.pwn(216) : warning 225: unreachable code
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamem odes\new.pwn(216) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Famille\Desktop\samp03asvr_R3_win32\gamem odes\new.pwn(216) : error 004: function "OnVehiclePaintjob" is not implemented

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


26 Errors.