Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- /*===================================================================================
- Ceci est un Biz Maker, s'est pour les gens qui ne savent pas comment rajouter des Biz
- Donc ce FS vas vous faciliter la tache ;)
- Créateur Rodion_Smith
- Adresse e-Mail: [email protected]
- =====================================================================================*/
- #define FILTERSCRIPT
- #define COLOR_LIGHTBLUE 0x33CCFFAA
- forward split(const strsrc[], strdest[][], delimiter);
- new Menu:Biz;
- new SetWorld;
- strtok(const string[], &index)
- {
- new length = strlen(string);
- while ((index < length) && (string[index] <= ' '))
- {
- index++;
- }
- new offset = index;
- new result[20];
- while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
- {
- result[index - offset] = string[index];
- index++;
- }
- result[index - offset] = EOS;
- return result;
- }
- public split(const strsrc[], strdest[][], delimiter)
- {
- new i, li;
- new aNum;
- new len;
- while(i <= strlen(strsrc)){
- if(strsrc[i]==delimiter || i==strlen(strsrc)){
- len = strmid(strdest[aNum], strsrc, li, i, 128);
- strdest[aNum][len] = 0;
- li = i+1;
- aNum++;
- }
- i++;
- }
- return 1;
- }
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" In-Game Biz Maker , By Rodion_Smith!");
- print("--------------------------------------\n");
- Biz = CreateMenu("Biz", 1, 50.0, 180.0, 200.0, 200.0);
- SetMenuColumnHeader(Menu:Biz, 0, "Biz");
- AddMenuItem(Menu:Biz, 0, "Gun Shop 1");
- AddMenuItem(Menu:Biz, 0, "Gun Shop 2");
- AddMenuItem(Menu:Biz, 0, "Restaurant");
- AddMenuItem(Menu:Biz, 0, "Police Armurie");
- AddMenuItem(Menu:Biz, 0, "City Bank");
- AddMenuItem(Menu:Biz, 0, "Bar");
- AddMenuItem(Menu:Biz, 0, "Hotel");
- AddMenuItem(Menu:Biz, 0, "Restaurant Life");
- AddMenuItem(Menu:Biz, 0, "Casino");
- AddMenuItem(Menu:Biz, 0, "Magasin Vetements 1");
- AddMenuItem(Menu:Biz, 0, "Magasin Vetements 2");
- AddMenuItem(Menu:Biz, 0, "Magasin Vetements 3");
- AddMenuItem(Menu:Biz, 0, "Magasin Vetements 4");
- AddMenuItem(Menu:Biz, 0, "Choisir un Biz");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- main()
- {
- print("\n----------------------------------");
- print(" In-Game Biz Maker , By Rodion Smith!");
- print("----------------------------------\n");
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- new string[256];
- new cmd[256];
- new tmp[256];
- new idx;
- cmd = strtok(cmdtext, idx);
- //----------------------------------------------Ne sert à rien-----------------------------------------------------
- if(strcmp(cmd, "/setbizworld", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: /SetbizWorld [World]");
- return 1;
- }
- new level;
- level = strval(tmp);
- {
- SetWorld = level;
- format(string, sizeof(string), "Biz World est mis à %d", SetWorld);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- }
- }
- return 1;
- }
- //----------------------------------------------Ajouter Biz-----------------------------------------------------
- if(strcmp(cmd, "/ajouterbiz", true) == 0)
- {
- TogglePlayerControllable(playerid, 0);
- ShowMenuForPlayer(Menu:Biz, playerid);
- return 1;
- }
- return 0;
- }
- public OnPlayerSelectedMenuRow(playerid, row)
- {
- new Menu:CurrentMenu = GetPlayerMenu(playerid);
- new entry[252];
- if(CurrentMenu == Menu:Biz)
- {
- switch(row)
- {
- case 0:
- {
- new Float:X, Float:Y, Float:Z;
- new File:hFile;
- GetPlayerPos(playerid, X, Y, Z);
- AddStaticPickup(1272, 2, X, Y, Z);
- format(entry, 250, "0|The State|~w~Gun Shop 1|Personne|%.2f|%.2f|%.2f|459.679107|-88.644302|999.554687|5|50000|0|0|1|4|500|500|1", X, Y, Z);
- hFile = fopen("bizz.cfg", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- HideMenuForPlayer(Menu:Biz, playerid);
- TogglePlayerControllable(playerid, 1);
- }
- case 1:
- {
- new Float:X, Float:Y, Float:Z;
- new File:hFile;
- GetPlayerPos(playerid, X, Y, Z);
- AddStaticPickup(1272, 2, X, Y, Z);
- format(entry, 250, "0|The State|~w~Gun Shop 2|Personne|%.2f|%.2f|%.2f|2170.278076|1618.818237|999.976623|5|50000|5|163910|0|1|493|500|10", X, Y, Z);
- hFile = fopen("bizz.cfg", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- HideMenuForPlayer(Menu:Biz, playerid);
- TogglePlayerControllable(playerid, 1);
- }
- case 2:
- {
- new Float:X, Float:Y, Float:Z;
- new File:hFile;
- GetPlayerPos(playerid, X, Y, Z);
- AddStaticPickup(1272, 2, X, Y, Z);
- format(entry, 250, "0|The State|~w~Restaurant|Personne|%.2f|%.2f|%.2f|-794.936218|490.632385|1376.195312|5|50000|0|67500|1|1|500|500|100", X, Y, Z);
- hFile = fopen("bizz.cfg", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- HideMenuForPlayer(Menu:Biz, playerid);
- TogglePlayerControllable(playerid, 1);
- }
- case 3:
- {
- new Float:X, Float:Y, Float:Z;
- new File:hFile;
- GetPlayerPos(playerid, X, Y, Z);
- AddStaticPickup(1272, 2, X, Y, Z);
- format(entry, 250, "0|The State|~w~Police Armurie|Personne|%.2f|%.2f|%.2f|246.376007|109.246002|1003.218811|5|50000|0|8143120|0|10|457|500|100", X, Y, Z);
- hFile = fopen("bizz.cfg", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- HideMenuForPlayer(Menu:Biz, playerid);
- TogglePlayerControllable(playerid, 1);
- }
- case 4:
- {
- new Float:X, Float:Y, Float:Z;
- new File:hFile;
- GetPlayerPos(playerid, X, Y, Z);
- AddStaticPickup(1272, 2, X, Y, Z);
- format(entry, 250, "0|The State|~w~City Bank|Personne|%.2f|%.2f|%.2f|2305.688964|-16.088100|26.749599|5|5000000|0|10000|0|0|99983|100000|100", X, Y, Z);
- hFile = fopen("bizz.cfg", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- HideMenuForPlayer(Menu:Biz, playerid);
- TogglePlayerControllable(playerid, 1);
- }
- case 5:
- {
- new Float:X, Float:Y, Float:Z;
- new File:hFile;
- GetPlayerPos(playerid, X, Y, Z);
- AddStaticPickup(1272, 2, X, Y, Z);
- format(entry, 250, "0|The State|~w~Bar|Personne|%.2f|%.2f|%.2f|-227.027999|1401.229980|27.765600|5|25000|100|99600|1|18|500|500|100", X, Y, Z);
- hFile = fopen("bizz.cfg", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- HideMenuForPlayer(Menu:Biz, playerid);
- TogglePlayerControllable(playerid, 1);
- }
- case 6:
- {
- new Float:X, Float:Y, Float:Z;
- new File:hFile;
- GetPlayerPos(playerid, X, Y, Z);
- AddStaticPickup(1272, 2, X, Y, Z);
- format(entry, 250, "0|The State|~w~Hotel|Personne|%.2f|%.2f|%.2f|2217.240478|-1150.798461|1025.855957|12|100000|50|100000|1|15|500|500|100", X, Y, Z);
- hFile = fopen("bizz.cfg", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- HideMenuForPlayer(Menu:Biz, playerid);
- TogglePlayerControllable(playerid, 1);
- }
- case 7:
- {
- new Float:X, Float:Y, Float:Z;
- new File:hFile;
- GetPlayerPos(playerid, X, Y, Z);
- AddStaticPickup(1272, 2, X, Y, Z);
- format(entry, 250, "0|The State|~w~Restaurant Life|Personne|%.2f|%.2f|%.2f|452.462799|-18.247299|1001.132812|8|847000|25|100000|1|1|50|50|100", X, Y, Z);
- hFile = fopen("bizz.cfg", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- HideMenuForPlayer(Menu:Biz, playerid);
- TogglePlayerControllable(playerid, 1);
- }
- case 8:
- {
- new Float:X, Float:Y, Float:Z;
- new File:hFile;
- GetPlayerPos(playerid, X, Y, Z);
- AddStaticPickup(1272, 2, X, Y, Z);
- format(entry, 250, "0|The State|~w~Casino|Personne|%.2f|%.2f|%.2f|1133.068237|-15.832798|1000.679687|8|2000000|25|100000|1|12|50|50|100", X, Y, Z);
- hFile = fopen("bizz.cfg", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- HideMenuForPlayer(Menu:Biz, playerid);
- TogglePlayerControllable(playerid, 1);
- }
- case 9:
- {
- new Float:X, Float:Y, Float:Z;
- new File:hFile;
- GetPlayerPos(playerid, X, Y, Z);
- AddStaticPickup(1272, 2, X, Y, Z);
- format(entry, 250, "0|The State|~w~Magasin de vêtements 1|Personne|%.2f|%.2f|%.2f|227.2902|-8.1511|1002.2109|4|25000|25|100000|1|5|50|50|100", X, Y, Z);
- hFile = fopen("bizz.cfg", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- HideMenuForPlayer(Menu:Biz, playerid);
- TogglePlayerControllable(playerid, 1);
- }
- case 10:
- {
- new Float:X, Float:Y, Float:Z;
- new File:hFile;
- GetPlayerPos(playerid, X, Y, Z);
- AddStaticPickup(1272, 2, X, Y, Z);
- format(entry, 250, "0|The State|~w~Magasin de vêtements 2|Personne|%.2f|%.2f|%.2f|203.7756|-50.6623|1001.8047|4|25000|25|100000|1|1|50|50|100", X, Y, Z);
- hFile = fopen("bizz.cfg", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- HideMenuForPlayer(Menu:Biz, playerid);
- TogglePlayerControllable(playerid, 1);
- }
- case 11:
- {
- new Float:X, Float:Y, Float:Z;
- new File:hFile;
- GetPlayerPos(playerid, X, Y, Z);
- AddStaticPickup(1272, 2, X, Y, Z);
- format(entry, 250, "0|The State|~w~Magasin de vêtements 3|Personne|%.2f|%.2f|%.2f|161.4524|-96.9166|1001.8047|4|25000|25|100000|1|18|50|50|100", X, Y, Z);
- hFile = fopen("bizz.cfg", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- HideMenuForPlayer(Menu:Biz, playerid);
- TogglePlayerControllable(playerid, 1);
- }
- case 12:
- {
- new Float:X, Float:Y, Float:Z;
- new File:hFile;
- GetPlayerPos(playerid, X, Y, Z);
- AddStaticPickup(1272, 2, X, Y, Z);
- format(entry, 250, "0|The State|~w~Magasin de vêtements 4|Personne|%.2f|%.2f|%.2f|204.4921|-168.8605|1000.5234|4|25000|25|100000|1|14|50|50|100", X, Y, Z);
- hFile = fopen("bizz.cfg", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- HideMenuForPlayer(Menu:Biz, playerid);
- TogglePlayerControllable(playerid, 1);
- }
- }
- }
- return 1;
- }
- public OnPlayerExitedMenu(playerid)
- {
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment