Hallo Scripter,
ich habe mal ein eigenes Admin Script nen bissl geschrieben nur jetzt treten fehler auf wenn man zb das Adminrang nicht hat das man sich dan noicht zum Bsn porten kann.
Bild :
Script:
new bsnenterLS;
new bsnexitLS;
new bsnexitLS;
public OnGameModeInit()
UsePlayerPedAnims();
bsnenterLS=CreatePickup(1559,1,362.9192,-75.2157,1001.5078);
bsnexitLS=CreatePickup(1559,1,1199.2650,-918.1416,43.1232, -1);
Create3DTextLabel("Mc Donalds\n Eingang",Gelb,1199.2650,-918.1416,43.1232,20,0); //Mc Donalds Eingang(BSN (LS) Eingang)
Create3DTextLabel("Mc Donalds\n Ausgang",Rot,362.9192,-75.2157,1001.5078,20,0); //Mc Donalds Eingang(BSN (LS) Ausgang)
bsnenterLS=CreatePickup(1559,1,362.9192,-75.2157,1001.5078);
bsnexitLS=CreatePickup(1559,1,1199.2650,-918.1416,43.1232, -1);
Create3DTextLabel("Mc Donalds\n Eingang",Gelb,1199.2650,-918.1416,43.1232,20,0); //Mc Donalds Eingang(BSN (LS) Eingang)
Create3DTextLabel("Mc Donalds\n Ausgang",Rot,362.9192,-75.2157,1001.5078,20,0); //Mc Donalds Eingang(BSN (LS) Ausgang)
if(strcmp("/GotoBSNLS",cmdtext,true, 10) ==0)
{
if(isPlayerAnAdmin(playerid,3))
{
SetPlayerPos(playerid,1227.3802,-917.8052,42.9025);
SendClientMessage(playerid, Hellgrün, "Du hast dich zu Mc Donalds teleportiert");
SendClientMessage(playerid, Rot, "NUTZE ES NICHT AUS MAN KANN ES IN DER LOG SEHEN");
}
SendClientMessage(playerid,Rot,"Du bist kein Admin oder dein Adminrang ist zu niedrig");
return 1;
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid==bsnenterLS)
{
SetPlayerPos(playerid,364.6540,-73.3810,1001.5078);
SetPlayerInterior(playerid,10);
GameTextForPlayer(playerid,"~g~Du hast ~g~MC Donalds ~n~~g~betreten !!",3000,6);
}
if(pickupid==bsnexitLS)
{
SetPlayerPos(playerid,1199.8710,-920.0526,43.1047);
SetPlayerFacingAngle(playerid,192.7485);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,0);
GameTextForPlayer(playerid,"~r~Du hast ~n~~r~MC Donalds ~n~~r~verlassen !!",3000,6);
}
return 1;
}
if(isPlayerAnAdmin(playerid,3))
{
SetPlayerPos(playerid,1227.3802,-917.8052,42.9025);
SendClientMessage(playerid, Hellgrün, "Du hast dich zu Mc Donalds teleportiert");
SendClientMessage(playerid, Rot, "NUTZE ES NICHT AUS MAN KANN ES IN DER LOG SEHEN");
}
SendClientMessage(playerid,Rot,"Du bist kein Admin oder dein Adminrang ist zu niedrig");
return 1;
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid==bsnenterLS)
{
SetPlayerPos(playerid,364.6540,-73.3810,1001.5078);
SetPlayerInterior(playerid,10);
GameTextForPlayer(playerid,"~g~Du hast ~g~MC Donalds ~n~~g~betreten !!",3000,6);
}
if(pickupid==bsnexitLS)
{
SetPlayerPos(playerid,1199.8710,-920.0526,43.1047);
SetPlayerFacingAngle(playerid,192.7485);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,0);
GameTextForPlayer(playerid,"~r~Du hast ~n~~r~MC Donalds ~n~~r~verlassen !!",3000,6);
}
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid==bsnenterLS)
{
SetPlayerPos(playerid,364.6540,-73.3810,1001.507;
SetPlayerInterior(playerid,10);
GameTextForPlayer(playerid,"~g~Du hast ~g~MC Donalds ~n~~g~betreten !!",3000,6);
}
if(pickupid==bsnexitLS)
{
SetPlayerPos(playerid,1199.8710,-920.0526,43.1047);
SetPlayerFacingAngle(playerid,192.7485);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,0);
GameTextForPlayer(playerid,"~r~Du hast ~n~~r~MC Donalds ~n~~r~verlassen !!",3000,6);
}
return 1;
}
{
if(pickupid==bsnenterLS)
{
SetPlayerPos(playerid,364.6540,-73.3810,1001.507;
SetPlayerInterior(playerid,10);
GameTextForPlayer(playerid,"~g~Du hast ~g~MC Donalds ~n~~g~betreten !!",3000,6);
}
if(pickupid==bsnexitLS)
{
SetPlayerPos(playerid,1199.8710,-920.0526,43.1047);
SetPlayerFacingAngle(playerid,192.7485);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,0);
GameTextForPlayer(playerid,"~r~Du hast ~n~~r~MC Donalds ~n~~r~verlassen !!",3000,6);
}
return 1;
}
stock AccountLaden(playerid)
{
new Spielerdatei[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
SetPlayerScore(playerid,dini_Int(Spielerdatei,"Level"));
GivePlayerMoney(playerid,dini_Int(Spielerdatei,"Geld"));
SetPVarInt(playerid,"Adminrang",dini_Int(Spielerdatei,"Adminrang"));
SetPVarInt(playerid,"Fraktion",dini_Int(Spielerdatei,"Fraktion"));
return 1;
}
{
new Spielerdatei[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
SetPlayerScore(playerid,dini_Int(Spielerdatei,"Level"));
GivePlayerMoney(playerid,dini_Int(Spielerdatei,"Geld"));
SetPVarInt(playerid,"Adminrang",dini_Int(Spielerdatei,"Adminrang"));
SetPVarInt(playerid,"Fraktion",dini_Int(Spielerdatei,"Fraktion"));
return 1;
}
stock SpielerSpeichern(playerid)
{
new Spielerdatei[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
dini_IntSet(Spielerdatei,"Level",GetPlayerScore(playerid));
dini_IntSet(Spielerdatei,"Geld",GetPlayerMoney(playerid));
dini_IntSet(Spielerdatei,"Adminrang",GetPVarInt(playerid,"Adminrang"));
dini_IntSet(Spielerdatei,"Fraktion",GetPVarInt(playerid,"Fraktion"));
return 1;
}
{
new Spielerdatei[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
dini_IntSet(Spielerdatei,"Level",GetPlayerScore(playerid));
dini_IntSet(Spielerdatei,"Geld",GetPlayerMoney(playerid));
dini_IntSet(Spielerdatei,"Adminrang",GetPVarInt(playerid,"Adminrang"));
dini_IntSet(Spielerdatei,"Fraktion",GetPVarInt(playerid,"Fraktion"));
return 1;
}
stock isPlayerAnAdmin(playerid,rang)
{
if(GetPVarInt(playerid,"Adminrang")>=rang)return 1;
return 0;
}
{
if(GetPVarInt(playerid,"Adminrang")>=rang)return 1;
return 0;
}
Und wie bekomme ich das Business Haus da weg??
Bild:
Und warum kan ich nicht mehr in BSN rein immer wen ich reingehen will werde ich glaich wieder am BSN ausgang geportet -.-
Script:
new bsnenterLS;
new bsnexitLS;
new bsnexitLS;
public OnGameModeInit()
UsePlayerPedAnims();
bsnenterLS=CreatePickup(1559,1,362.9192,-75.2157,1001.5078);
bsnexitLS=CreatePickup(1559,1,1199.2650,-918.1416,43.1232, -1);
Create3DTextLabel("Mc Donalds\n Eingang",Gelb,1199.2650,-918.1416,43.1232,20,0); //Mc Donalds Eingang(BSN (LS) Eingang)
Create3DTextLabel("Mc Donalds\n Ausgang",Rot,362.9192,-75.2157,1001.5078,20,0); //Mc Donalds Eingang(BSN (LS) Ausgang)
bsnenterLS=CreatePickup(1559,1,362.9192,-75.2157,1001.5078);
bsnexitLS=CreatePickup(1559,1,1199.2650,-918.1416,43.1232, -1);
Create3DTextLabel("Mc Donalds\n Eingang",Gelb,1199.2650,-918.1416,43.1232,20,0); //Mc Donalds Eingang(BSN (LS) Eingang)
Create3DTextLabel("Mc Donalds\n Ausgang",Rot,362.9192,-75.2157,1001.5078,20,0); //Mc Donalds Eingang(BSN (LS) Ausgang)
if(strcmp("/GotoBSNLS",cmdtext,true, 10) ==0)
{
if(isPlayerAnAdmin(playerid,3))
{
SetPlayerPos(playerid,1227.3802,-917.8052,42.9025);
SendClientMessage(playerid, Hellgrün, "Du hast dich zu Mc Donalds teleportiert");
SendClientMessage(playerid, Rot, "NUTZE ES NICHT AUS MAN KANN ES IN DER LOG SEHEN");
}
SendClientMessage(playerid,Rot,"Du bist kein Admin oder dein Adminrang ist zu niedrig");
return 1;
[pwn]public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid==bsnenterLS)
{
SetPlayerPos(playerid,364.6540,-73.3810,1001.5078);
SetPlayerInterior(playerid,10);
GameTextForPlayer(playerid,"~g~Du hast ~g~MC Donalds ~n~~g~betreten !!",3000,6);
}
if(pickupid==bsnexitLS)
{
SetPlayerPos(playerid,1199.8710,-920.0526,43.1047);
SetPlayerFacingAngle(playerid,192.7485);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,0);
GameTextForPlayer(playerid,"~r~Du hast ~n~~r~MC Donalds ~n~~r~verlassen !!",3000,6);
}
return 1;
}
if(isPlayerAnAdmin(playerid,3))
{
SetPlayerPos(playerid,1227.3802,-917.8052,42.9025);
SendClientMessage(playerid, Hellgrün, "Du hast dich zu Mc Donalds teleportiert");
SendClientMessage(playerid, Rot, "NUTZE ES NICHT AUS MAN KANN ES IN DER LOG SEHEN");
}
SendClientMessage(playerid,Rot,"Du bist kein Admin oder dein Adminrang ist zu niedrig");
return 1;
[pwn]public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid==bsnenterLS)
{
SetPlayerPos(playerid,364.6540,-73.3810,1001.5078);
SetPlayerInterior(playerid,10);
GameTextForPlayer(playerid,"~g~Du hast ~g~MC Donalds ~n~~g~betreten !!",3000,6);
}
if(pickupid==bsnexitLS)
{
SetPlayerPos(playerid,1199.8710,-920.0526,43.1047);
SetPlayerFacingAngle(playerid,192.7485);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,0);
GameTextForPlayer(playerid,"~r~Du hast ~n~~r~MC Donalds ~n~~r~verlassen !!",3000,6);
}
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid==bsnenterLS)
{
SetPlayerPos(playerid,364.6540,-73.3810,1001.5078);
SetPlayerInterior(playerid,10);
GameTextForPlayer(playerid,"~g~Du hast ~g~MC Donalds ~n~~g~betreten !!",3000,6);
}
if(pickupid==bsnexitLS)
{
SetPlayerPos(playerid,1199.8710,-920.0526,43.1047);
SetPlayerFacingAngle(playerid,192.7485);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,0);
GameTextForPlayer(playerid,"~r~Du hast ~n~~r~MC Donalds ~n~~r~verlassen !!",3000,6);
}
return 1;
}
{
if(pickupid==bsnenterLS)
{
SetPlayerPos(playerid,364.6540,-73.3810,1001.5078);
SetPlayerInterior(playerid,10);
GameTextForPlayer(playerid,"~g~Du hast ~g~MC Donalds ~n~~g~betreten !!",3000,6);
}
if(pickupid==bsnexitLS)
{
SetPlayerPos(playerid,1199.8710,-920.0526,43.1047);
SetPlayerFacingAngle(playerid,192.7485);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,0);
GameTextForPlayer(playerid,"~r~Du hast ~n~~r~MC Donalds ~n~~r~verlassen !!",3000,6);
}
return 1;
}
Beim Compilieren kommt keine Errors
Bild :