Hey Leute könnt ihr mir mal ein Befehl erstellen das ich mit dem Admin befehl /agivelicense alle Scheine geben kann.
wäre sehr nett
Danke
Hey Leute könnt ihr mir mal ein Befehl erstellen das ich mit dem Admin befehl /agivelicense alle Scheine geben kann.
wäre sehr nett
Danke
Wäre mal noch nett, wenn du uns erzählst
Was ist es für ein Script
und
die Variablen wie die Scheine/licensen definiert sind im Script..
lg
Der befehl /lic ist doch viel einfacher warum so schwer machen
Aus dem LoH:
if(strcmp(cmd, "/agivelicense", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 2)// MAn muss mindestens admin level 2 sein
{
new x_nr[256];
x_nr = strtok(cmdtext, idx);
if(!strlen(x_nr)) {
SendClientMessage(playerid, COLOR_WHITE, "Benutze: /agivelicense [licname] [ID/NAME]");
SendClientMessage(playerid, COLOR_WHITE, "Verfügbar: Driving, Flying, Sailing, Fishing, Weapon, Motorrad, LKW, Alle,Perso.");
return 1;
}
if(strcmp(x_nr,"driving",true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "Benutze: /agivelicense [licname] [ID/NAME]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* Du gibst den Führerschein an %s.",giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* ADMIN %s gab dir den Führerschein (Fahr Vorsichtig).",sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
PlayerInfo[giveplayerid][pCarLic] = 1;
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Spieler ist offline !");
return 1;
}
}
else if(strcmp(x_nr,"flying",true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "Benutze: /agivelicense [licname] [ID/NAME]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* Du gibst den Flugschein an %s.",giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* ADMIN %s gab dir den Flugschein",sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
PlayerInfo[giveplayerid][pFlyLic] = 1;
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Spieler ist offline !");
return 1;
}
}
else if(strcmp(x_nr,"sailing",true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "Benutze: /agivelicense[licname] [ID/NAME]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* Du gibst den Bootschein an %s.",giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* ADMIN %s gab dir den Bootschein.",sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
PlayerInfo[giveplayerid][pBoatLic] = 1;
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Spieler ist Offline !");
return 1;
}
}
else if(strcmp(x_nr,"fishing",true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "Benutze: /agivelicense [licname] [ID/NAME]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* Du gibst den Angelschein %s.",giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* ADMIN %s gab dir den Angelschein.",sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
PlayerInfo[giveplayerid][pFishLic] = 1;
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Spieler ist Offline !");
return 1;
}
}
else if(strcmp(x_nr,"weapon",true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "Benutze: /agivelicense [licname] [ID/NAME]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* Du gibst den Waffenschein an %s.",giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* ADMIN %s gibt dir den Waffenschein",sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
PlayerInfo[giveplayerid][pGunLic] = 1;
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Spieler ist Offline !");
return 1;
}
}
else if(strcmp(x_nr,"LKW",true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "Benutze: /agivelicense [licname] [ID/NAME]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* Du gibst den LKW schein an %s.",giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* ADMIN %s gibt dir den LKWschein",sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
PlayerInfo[giveplayerid][pGunLic] = 1;
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Spieler ist Offline !");
return 1;
}
}
else if(strcmp(x_nr,"Motorrad",true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "Benutze: /agivelicense [licname] [ID/NAME]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* Du gibst den Motorradschein an %s.",giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* ADMIN %s gibt dir den Motorradschein",sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
PlayerInfo[giveplayerid][pMotoLic] = 1;
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Spieler ist Offline !");
return 1;
}
}
else if(strcmp(x_nr,"alle",true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "Benutze: /agivelicense [licname] [ID/NAME]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* Du gibst %s alle Scheine.",giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* ADMIN %s hat die alle Scheine gegeben",sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
PlayerInfo[giveplayerid][pCarLic] = 1;
PlayerInfo[giveplayerid][pFlyLic] = 1;
PlayerInfo[giveplayerid][pBoatLic] = 1;
PlayerInfo[giveplayerid][pFishLic] = 1;
PlayerInfo[giveplayerid][pGunLic] = 1;
PlayerInfo[giveplayerid][pLKWLic] = 1;
PlayerInfo[giveplayerid][pMotoLic] = 1;
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Spieler ist Offline !");
return 1;
}
}
else if(strcmp(x_nr,"perso",true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "Benutze: /agivelicense [licname] [ID/NAME]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* Du gibst %s den Personalausweiß.",giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* ADMIN %s hat dir den Personalausweiß gegeben.",sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
PlayerInfo[giveplayerid][pOwnPerso] = 1;
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Spieler ist Offline !");
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Du bist kein Lehrer !");
return 1;
}
}
return 1;
}