Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- //#define ZUFALL // Wenn die Buchstaben für die Stadt zufällig sein sollen, und nicht LS, oder SF.
- public OnPlayerConnect(playerid)
- {
- new string[10]; string = CreateNummernSchild(playerid);
- SendClientMessage(playerid, 0xffffffff, string);
- return 1;
- }
- new ABC[26][0] = {
- {"A"}, {"B"}, {"C"}, {"D"}, {"E"}, {"F"}, {"G"}, {"H"}, {"I"}, {"J"}, {"K"}, {"L"}, {"M"},
- {"N"}, {"O"}, {"P"}, {"Q"}, {"R"}, {"S"}, {"T"}, {"U"}, {"V"}, {"W"}, {"X"}, {"Y"}, {"Z"}
- };
- CreateNummernSchild(playerid)
- {
- new Float:xx, Float:yy, Float:zz;
- GetPlayerPos(playerid, xx, yy, zz);
- new zufall = random(2);
- new bla1 = random(26);
- new bla2 = random(26);
- new zahl1 = random(9)+1, zahl2 = random(9)+1, zahl3 = random(9)+1, zahl4 = random(9)+1;
- new string[10], stadt[2], mitte[2], zahlen[4];
- new zahl = random(4)+1;
- if((xx > -992.5172 && xx < 4000.0000) && (yy < 528.0000 && yy > -4000.0000))
- {
- format(stadt, sizeof(stadt), "LS");
- }
- if((xx > -4000.0000 && xx< -992.5172) && (yy < 4000.0000 && yy > -4000.0000))
- {
- format(stadt, sizeof(stadt), "SF");
- }
- if(zufall) { format(mitte, sizeof(mitte), "%s%s", ABC[bla1], ABC[bla2]); }
- else { format(mitte, sizeof(mitte), "%s", ABC[bla1]); }
- if(zahl == 1){format(zahlen, sizeof(zahlen), "%d", zahl1);}
- else if(zahl == 2){format(zahlen, sizeof(zahlen), "%d%d", zahl1, zahl2);}
- else if(zahl == 3){format(zahlen, sizeof(zahlen), "%d%d%d", zahl1, zahl2, zahl3);}
- else if(zahl == 4){format(zahlen, sizeof(zahlen), "%d%d%d%d", zahl1, zahl2, zahl3, zahl4);}
- format(string, sizeof(string), "%s-%s-%s", stadt, mitte, zahlen); // Das ist der
- return string;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement