SA-MP Forums Archive
how add admin car - 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: how add admin car (/showthread.php?tid=84886)



how add admin car - BLACK-RIDER-1692 - 03.07.2009

Hello



How i Can Add Admin car in my server?


Re: how add admin car - CJ101 - 03.07.2009

Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
	{
	new vehmodel = GetVehicleModel(GetPlayerVehicleID(playerid));
	if(vmodel == MODEL && !IsPlayerAdmin(playerid)) // change MODEL to the modelid
	  {
	  DestroyVehicle(GetPlayerVehicleID(playerid));
	  }
	}

}



Re: how add admin car - BLACK-RIDER-1692 - 03.07.2009

that is good tnx


if player in car send error message "You are not admin"
how make that


Re: how add admin car - iLinx - 03.07.2009

just add a
Код:
else {
SendClientMessage(playerid, yourcolor, "Your not admin!");
}
after the if statment finishes


Re: how add admin car - refshal - 03.07.2009

Quote:
Originally Posted by iLinx
Your not admin
You're not admin*

:P


Re: how add admin car - BLACK-RIDER-1692 - 03.07.2009

thank you very much


Re: how add admin car - BLACK-RIDER-1692 - 04.07.2009

i get 4 errors


Код:
C:\Documents and Settings\xxx\My Documents\LV - DM (-1.1)\LV - DM (-1.1)\LV - DM (-1.1)\LV - DM (-1.1-a)\gamemodes\x.pwn(13419) : warning 217: loose indentation
C:\Documents and Settings\xxx\My Documents\LV - DM (-1.1)\LV - DM (-1.1)\LV - DM (-1.1)\LV - DM (-1.1-a)\gamemodes\x.pwn(13419) : error 029: invalid expression, assumed zero
C:\Documents and Settings\xxx\My Documents\LV - DM (-1.1)\LV - DM (-1.1)\LV - DM (-1.1)\LV - DM (-1.1-a)\gamemodes\x.pwn(13419) : error 017: undefined symbol "newstate"
C:\Documents and Settings\xxx\My Documents\LV - DM (-1.1)\LV - DM (-1.1)\LV - DM (-1.1)\LV - DM (-1.1-a)\gamemodes\x.pwn(13421) : error 017: undefined symbol "newstate"
C:\Documents and Settings\xxx\My Documents\LV - DM (-1.1)\LV - DM (-1.1)\LV - DM (-1.1)\LV - DM (-1.1-a)\gamemodes\x.pwn(13424) : error 017: undefined symbol "vmodel"
C:\Documents and Settings\xxx\My Documents\LV - DM (-1.1)\LV - DM (-1.1)\LV - DM (-1.1)\LV - DM (-1.1-a)\gamemodes\x.pwn(13423) : warning 204: symbol is assigned a value that is never used: "vehmodel"
C:\Documents and Settings\xxx\My Documents\LV - DM (-1.1)\LV - DM (-1.1)\LV - DM (-1.1)\LV - DM (-1.1-a)\gamemodes\x.pwn(13423 -- 13435) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.



Re: how add admin car - refshal - 04.07.2009

pawn Код:
#include a_samp

public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
new vehmodel = GetVehicleModel(GetPlayerVehicleID(playerid));
if(vmodel == MODEL && !IsPlayerAdmin(playerid)) // change MODEL to the modelid
{
DestroyVehicle(GetPlayerVehicleID(playerid));
return 1;
}
else return SendClientMessage(playerid, 0xFFFFFFAA, "You're not an Admin!");
}