ocmd:gutschein(playerid, params[])
{
if(!params[0]) return SendClientMessage(playerid, 0xFF0000FF, "/gutschein [Code]");
new code[40];
format(code, sizeof(code), "/codes/%s.txt", params);
if(!fexist(code)) return SendClientMessage(playerid, 0xFF0000FF, "Code existiert nicht.");
new typ = dini_Int(code, "typ");
new wert = dini_Int(code, "wert");
switch(typ)
{
case 1:
{
GivePlayerMoney(playerid, wert);
SendClientMessage(playerid,-1,"Code eingelöst: %i$ bekommen.",wert); //69906
}
case 2:
{
PlayerInfo[playerid][pExp] = wert;
SendClientMessage(playerid,-1,"Code eingelöst: %i Respektpunkte bekommen.",wert); //69911
}
case 3:
{
PlayerInfo[playerid][pDonateRank] = wert;
SendClientMessage(playerid,-1,"Code eingelöst: Du hast Premium Level %i bekommen.",wert); //69916
}
case 4:
{
PlayerInfo[playerid][pAllowNeon] = 1;
SendClientMessage(playerid,-1,"Code eingelöst: Du hast einen Neon Gutschein eingelöst."); //69920
SendClientMessage(playerid,-1,"Fahre zum NeonShop um dir Neon an dein Auto zu bauen.");
//ShowPlayerDialog(playerid, DIALOG_GUTSCHEINCARTAKE, DIALOG_STYLE_LIST, "Autoauswahl - Gutscheinsystem","Sultan\nInfernus\nTurismo\nCheetah\nPremier\nBanshee\nZR-350\nComet\nBullet\nJester\n","Select", "Cancel");
}
}
fremove(code);
return 1;
}
ocmd:creategutschein(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] == 5)
{
new typ, wert;
if(!sscanf(params,"ii",typ,wert))return SendClientMessage(playerid, 0xFF0000FF, "/createcode [Typ] [Wert]");
if(typ < 1 || typ > 4)return SendClientMessage(playerid,-1,"Bitte wähle einen Typ aus von 1-4");
if(wert < 1 || wert > 1000000) return SendClientMessage(playerid,-1,"Wert bitte nur von 1 - 1Mio.");
SendClientMessage(playerid, 0xFF0000FF, "1 = Geld | 2 = Respektpunkte | 3 = Premium | 4 = UBB Fahrzeug");
new code[40], str[145];
format(code, sizeof(code), "%04d-%04d-%04d-%04d", random(10000), random(10000), random(10000), random(10000));
format(str, sizeof(str), "Gutscheincode : %s",code);
SendClientMessage(playerid,ROT,str);
format(code, sizeof(code), "/codes/%s.txt", code);
dini_Create(code);
dini_IntSet(code, "typ", typ);
dini_IntSet(code, "wert", wert);
}
else
{
SendClientMessage(playerid, 0xFF0000FF, "Du hast kein Adminlevel 7");
}
return 1;
}
C:\Users\Ostermann\Downloads\GRZ-Dome\GRZ Dome\gamemodes\LYD.pwn(69883) : warning 213: tag mismatch
C:\Users\Ostermann\Downloads\LYD\LYD\gamemodes\LYD.pwn(69906) : warning 202: number of arguments does not match definition
C:\Users\Ostermann\Downloads\LYD\LYD\gamemodes\LYD.pwn(69911) : warning 202: number of arguments does not match definition
C:\Users\Ostermann\Downloads\LYD\LYD\gamemodes\LYD.pwn(69916) : warning 202: number of arguments does not match definition
C:\Users\Ostermann\Downloads\LYD\LYD\gamemodes\LYD.pwn(69920) : warning 213: tag mismatch
ocmd:punkte(playerid,params[]){
if(PlayerInfo[playerid][pMember] == 24 || PlayerInfo[playerid][pLeader] == 24 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 23 || PlayerInfo[playerid][pLeader] == 23)
{
new pID,reason[64],string[144],punkte, sendername[MAX_PLAYER_NAME], giveplayer[MAX_PLAYER_NAME];
GetPlayerName(pID, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if(sscanf(params,"uis[64]",pID,punkte,reason))return SendClientMessage(playerid,GELB,"Tippe: /punkte [ID][Anzahl][Grund]");
format(string,144,"Ordnungsbeamter %s hat dir %d Strafpunkte eingetragen! Grund: %s",sendername,punkte,reason),SendClientMessage(pID,COLOR_LIGHTRED,string);
format(string,144,"Du hast %s %d Strafpunkte eingetragen! Grund: %s",giveplayer,punkte,reason),SendClientMessage(playerid,COLOR_LIGHTRED,string);
format(string,144,"(( HQ: %s hat %s %d Strafpunkte eingetragen! Grund: %s ))",sendername,giveplayer,punkte,reason);
for(new i=0; i<GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i) && IsADChatter(i))
{
SendClientMessage(i,COLOR_ALLDEPT,string);
}
}
PlayerInfo[pID][pStrafpunkte] = punkte; //69883
Log("PunkteLog", string);
}
else
{
SendClientMessage(playerid,-1,"Du bist nicht beim Ordnungsamt");
}
return 1;
}
//: Was vergessen!