Szerző Téma: Csak admin szálhat be a rendõr kocsikba  (Megtekintve 2106 alkalommal)

Csak admin szálhat be a rendõr kocsikba
« Dátum: 2012. Március 07. - 15:48:23 »
0 Show voters
Csá all!
Kéne nekem egy olyan fs amibe az ál,hogy csak admin ülhet be a rendõr kocsikba...
A Rendõr helibe,LS PD,LV PD,SF PD,S.W.A.T,Ranger,Enforcer,FBI Car
Köszi!
és a civilnek irja ki textdrawosan,hogy csak rendõr vezetheti a kocsit.

Nem elérhető CANNONN

  • 2139
    • Profil megtekintése
Csak admin szálhat be a rendõr kocsikba
« Válasz #1 Dátum: 2012. Március 07. - 16:04:53 »
+1 Show voters
Így a rendõr jámûveket csak \"/rcon login \"jelszo\"\" parancs beírása után lehet használni.
Ha meg mondod, hogy milyen admin rendszert használsz, akkor megírom arra is.
 

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(vehicleid == 523 || 427 || 490 || 497 || 425 || 520 || 528 ||596 || 598 || 597 || 599 || 432 || 601)
{
if(!IsPlayerAdmin(playerid))
{
SendClientMessage(playerid,0xff0000AA, \"Ezt a jármûvet csak rcon adminisztrátor használhatja.\");
ClearAnimations(playerid);
}
}
return 1;
}
« Utoljára szerkesztve: 2012. Március 07. - 16:31:00 írta Cannonn »

Csak admin szálhat be a rendõr kocsikba
« Válasz #2 Dátum: 2012. Március 07. - 16:15:30 »
0 Show voters
Meg tudod úgy irni,hogy egy ladmin -os és egy luxadminos?
mert nem otm még h meiket fogom használni és azért kell :D
Kösz

Nem elérhető CANNONN

  • 2139
    • Profil megtekintése
Csak admin szálhat be a rendõr kocsikba
« Válasz #3 Dátum: 2012. Március 07. - 16:16:32 »
+1 Show voters
LuxAdmin:
 

#include <a_samp>
#include ladmin
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(vehicleid == 523 ||427 || 490 || 497 || 425 || 520 || 528 ||596 || 598 || 597 || 599 || 432 || 601)
{
if(!IsPlayerLuxAdmin(playerid))
{
SendClientMessage(playerid,0xff0000AA, \"Ezt a jármûvet csak rcon adminisztrátor használhatja.\");
ClearAnimations(playerid);
}
}
return 1;
}

 
Ladmin4v2:
 
#include <a_samp>
#include ladmin
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(vehicleid == 523 ||427 || 490 || 497 || 425 || 520 || 528 ||596 || 598 || 597 || 599 || 432 || 601)
{
if(!IsPlayerLAdmin(playerid))
{
SendClientMessage(playerid,0xff0000AA, \"Ezt a jármûvet csak rcon adminisztrátor használhatja.\");
ClearAnimations(playerid);
}
}
return 1;
}
« Utoljára szerkesztve: 2012. Március 07. - 16:31:12 írta Cannonn »

Csak admin szálhat be a rendõr kocsikba
« Válasz #4 Dátum: 2012. Március 07. - 16:24:23 »
0 Show voters
Kösz megy a +!
Beraktam azt,hogy csak rcon adminok tudnak beszálni a módba és ez a hiba:
 
E:\\Documents and Settings\\Krisz\\Asztal\\[R]endõr [A]cademy\\gamemodes\\RA.pwn(239) : error 001: expected token: \";\", but found \"-identifier-\"

Nem elérhető CANNONN

  • 2139
    • Profil megtekintése
Csak admin szálhat be a rendõr kocsikba
« Válasz #5 Dátum: 2012. Március 07. - 16:30:25 »
0 Show voters
Upsz, lemaradt egy vesszõ a sor végérõl.
 

#include <a_samp>
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(vehicleid == 523 ||427 || 490 || 497 || 425 || 520 || 528 ||596 || 598 || 597 || 599 || 432 || 601)
{
if(!IsPlayerAdmin(playerid))
{
SendClientMessage(playerid,0xff0000AA, \"Ezt a jármûvet csak rcon adminisztrátor használhatja.\");
ClearAnimations(playerid);
}
}
return 1;
}

Csak admin szálhat be a rendõr kocsikba
« Válasz #6 Dátum: 2012. Március 07. - 17:11:56 »
0 Show voters
E:\\Documents and Settings\\Krisz\\Asztal\\[R]endõr [A]cademy\\gamemodes\\RA.pwn(236) : error 017: undefined symbol \"IsPlayerLuxAdmin\"
Pawn compiler 3.2.3664           Copyright © 1997-2006, ITB CompuPhase
1 Error.

Nem elérhető CANNONN

  • 2139
    • Profil megtekintése
Csak admin szálhat be a rendõr kocsikba
« Válasz #7 Dátum: 2012. Március 07. - 17:16:30 »
0 Show voters
Include mappába másold be.
http://solidfiles.com/d/8eda9bb1cd/

Csak admin szálhat be a rendõr kocsikba
« Válasz #8 Dátum: 2012. Március 07. - 17:17:24 »
0 Show voters
stock IsPlayerLuxAdmin(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
new file[256], tmp, tmp2;
format(file,256,\"/LuxAdmin/Accounts/%s.sav\",udb_encode(name));
tmp = dini_Int(file,\"Level\");
tmp2 = dini_Int(file,\"Loggedin\");
if( (IsPlayerConnected(playerid)) && (tmp > 0) && (tmp2 == 1) )
return true;
else return false;
}
}

Nem elérhető CANNONN

  • 2139
    • Profil megtekintése
Csak admin szálhat be a rendõr kocsikba
« Válasz #9 Dátum: 2012. Március 07. - 17:20:53 »
0 Show voters
Amúgy egy egyszerûbb megoldás.
A mód elejére rakd be.
 
#include <ldudb>

 
Ezt oda, ahova akarod.
 

stock IsPlayerLuxAdmin(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
new file[256], tmp, tmp2;
format(file,256,\"/LuxAdmin/Accounts/%s.sav\",udb_encode(name));
tmp = dini_Int(file,\"Level\");
tmp2 = dini_Int(file,\"Loggedin\");
if( (IsPlayerConnected(playerid)) && (tmp > 0) && (tmp2 == 1) )
return true;
else return false;
}

Csak admin szálhat be a rendõr kocsikba
« Válasz #10 Dátum: 2012. Március 07. - 17:32:32 »
0 Show voters
most ezt nem értem :D xDDDDD

Nem elérhető CANNONN

  • 2139
    • Profil megtekintése
Csak admin szálhat be a rendõr kocsikba
« Válasz #11 Dátum: 2012. Március 07. - 17:49:41 »
0 Show voters
A módod elejére beírod, hogy #include ldubd és ezt valahova beilleszted a módba, aztán már használhatod is az LuxAdminos verziót, amit fentebb leírtam.
 

stock IsPlayerLuxAdmin(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
new file[256], tmp, tmp2;
format(file,256,\"/LuxAdmin/Accounts/%s.sav\",udb_encode(name));
tmp = dini_Int(file,\"Level\");
tmp2 = dini_Int(file,\"Loggedin\");
if( (IsPlayerConnected(playerid)) && (tmp > 0) && (tmp2 == 1) )
return true;
else return false;
}

Csak admin szálhat be a rendõr kocsikba
« Válasz #12 Dátum: 2012. Március 07. - 18:34:45 »
0 Show voters
most beleraktam az admin only skint és a kocsit is ....
és a hiba:
E:\\Documents and Settings\\Krisz\\Asztal\\[R]endõr [A]cademy\\gamemodes\\RA.pwn(528) : error 021: symbol already defined: \"strtok\"
E:\\Documents and Settings\\Krisz\\Asztal\\[R]endõr [A]cademy\\gamemodes\\RA.pwn(543) : error 047: array sizes do not match, or destination array is too small
E:\\Documents and Settings\\Krisz\\Asztal\\[R]endõr [A]cademy\\gamemodes\\RA.pwn(551) : warning 203: symbol is never used: \"chlist\"
Pawn compiler 3.2.3664           Copyright © 1997-2006, ITB CompuPhase
2 Errors.

Nem elérhető CANNONN

  • 2139
    • Profil megtekintése
Csak admin szálhat be a rendõr kocsikba
« Válasz #13 Dátum: 2012. Március 07. - 18:53:43 »
0 Show voters
Másold be a hibás sorokat.

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal