-
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.
-
Í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;
}
-
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
-
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;
}
-
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-\"
-
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;
}
-
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.
-
Include mappába másold be.
http://solidfiles.com/d/8eda9bb1cd/
-
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;
}
}
-
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;
}
-
most ezt nem értem :D xDDDDD
-
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;
}
-
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.
-
Másold be a hibás sorokat.