Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*BLANK SCRIPT FROM http://forum.sa-mp.com*/
- /*CREDITS:Y_LESS for y_ini,y_commands and sscanf
- Dracoblue: for udb_hash
- [R]hisy:Scripter GAMEMODE
- */
- #include <a_samp>
- #include <YSI\y_ini>
- #include <YSI\y_commands>
- #include <sscanf2>
- //========[Path]===============//
- #define PATH "/Users/%s.ini"//
- //===================Dialogs===================
- #define Register 0
- #define Login 1
- #define SSex 2
- #define Sage 3
- #define SOrigin 4
- //==================Colors====================//
- #define TEAM_CYAN_COLOR 0xFF8282AA
- #define COLOR_FADE 0xE6E6E6E6
- #define ORANGE 0xFEAA00FF
- #define COLOR_GRAD1 0xB4B5B7FF
- #define COLOR_GREY 0xAFAFAFAA
- #define RED_WIT 0xFF6347AA
- #define COLOR_GRAD5 0xE3E3E3FF
- #define COLOR_GRAD4 0xD8D8D8FF
- #define BLUE_CL 0x33CCFFAA
- #define COLOR_RADIOFACTION 0x9B9BFFFF // Blue
- #define DORAD 0xF6C861AA
- #define COLOR_GRAD2 0xBFC0C2FF
- #define COLOR_FADE1 0xE6E6E6E6
- #define COLOR_FADE2 0xC8C8C8C8
- #define COLOR_GRAD2 0xBFC0C2FF
- #define COLOR_FADE3 0xAAAAAAAA
- #define COLOR_FADE4 0x8C8C8C8C
- #define COLOR_FADE5 0x6E6E6E6E
- #define COLOR_PURPLE 0x9B009AA0
- #define COLOR_WHITE 0xFFFFFFAA
- #define BLUE 0x0000FFFF
- #define YELLOW 0xFFFF00FF
- #define RED 0xFF0000FF
- #define GREEN 0x00FF00FF
- #define WHITE 0xFFFFFFFF
- #define BLACK 0x000000FF
- #define WHITE_BLACK 0xAFAFAFAA
- #define TALK 0xE6E6E6E6
- #define TALK2 0xC8C8C8C8
- #define TALK3 0xAAAAAAAA
- #define TALK4 0x8C8C8C8C
- #define TALK5 0x6E6E6E6E
- #define Hospital 1178.4025,-1323.0923,14.1183//coordinates for hospital
- #pragma tabsize 0 //elimitated warning! "loose identification"
- new PTuto[MAX_PLAYERS];
- new PuedeP[MAX_PLAYERS];
- new EnTuto[MAX_PLAYERS];
- forward Tuto(playerid);
- //=====[Forwards y news]========//
- forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);//proxdetector
- new Logued[MAX_PLAYERS];
- new BigEar[MAX_PLAYERS];
- new bool:Dead[MAX_PLAYERS];
- enum Info
- {
- pPassword,
- pTutorial,
- pMoney,
- pAdmin,
- pSex,
- pAge,
- pOrigin,
- pFaction
- };
- new PlayerInformation[MAX_PLAYERS][Info];
- //======[Stocks]=============//
- stock UserPath(playerid)
- {
- new string[128],playername[MAX_PLAYER_NAME];
- GetPlayerName(playerid,playername,sizeof(playername));
- format(string,sizeof(string),PATH,playername);
- return string;
- }
- /*Credits to Dracoblue*/
- stock udb_hash(buf[]) {
- new length=strlen(buf);
- new s1 = 1;
- new s2 = 0;
- new n;
- for (n=0; n<length; n++)
- {
- s1 = (s1 + buf[n]) % 65521;
- s2 = (s2 + s1) % 65521;
- }
- return (s2 << 16) + s1;
- }
- //=========================[Callbacks]====================================//
- forward LoadUser_data(playerid,name[],value[]);
- public LoadUser_data(playerid,name[],value[])
- {
- INI_Int("Password",PlayerInformation[playerid][pPassword]);
- INI_Int("Money",PlayerInformation[playerid][pMoney]);
- INI_Int("Tutorial",PlayerInformation[playerid][pTutorial]);
- INI_Int("Admin",PlayerInformation[playerid][pAdmin]);
- INI_Int("Sex",PlayerInformation[playerid][pSex]);
- INI_Int("Age",PlayerInformation[playerid][pAge]);
- INI_Int("Origin",PlayerInformation[playerid][pOrigin]);
- INI_Int("Faction",PlayerInformation[playerid][pFaction]);
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- switch(dialogid){
- //==[Register age]==//
- case Sage:
- {
- if(response)
- {
- switch(listitem){
- case 0:
- {
- PlayerInformation[playerid][pAge] = 16;
- ShowPlayerDialog(playerid, SOrigin, DIALOG_STYLE_LIST, "{FFFFFF}Select you Origin", "Argentina\nEspaña\nChile\nColombia\nVenezuela\nParaguay\nUruguay\nMexico\nEl Salvador\nBrazil\nPeru", "Select", "");
- }
- case 1:
- {
- PlayerInformation[playerid][pAge] = 17;
- ShowPlayerDialog(playerid, SOrigin, DIALOG_STYLE_LIST, "{FFFFFF}Select you Origin", "Argentina\nEspaña\nChile\nColombia\nVenezuela\nParaguay\nUruguay\nMexico\nEl Salvador\nBrazil\nPeru", "Select", "");
- }
- case 2:
- {
- PlayerInformation[playerid][pAge] = 18;
- ShowPlayerDialog(playerid, SOrigin, DIALOG_STYLE_LIST, "{FFFFFF}Select you Origin", "Argentina\nEspaña\nChile\nColombia\nVenezuela\nParaguay\nUruguay\nMexico\nEl Salvador\nBrazil\nPeru", "Select", "");
- }
- case 3:
- {
- PlayerInformation[playerid][pAge] = 19;
- ShowPlayerDialog(playerid, SOrigin, DIALOG_STYLE_LIST, "{FFFFFF}Select you Origin", "Argentina\nEspaña\nChile\nColombia\nVenezuela\nParaguay\nUruguay\nMexico\nEl Salvador\nBrazil\nPeru", "Select", "");
- }
- case 4:
- {
- PlayerInformation[playerid][pAge] = 20;
- ShowPlayerDialog(playerid, SOrigin, DIALOG_STYLE_LIST, "{FFFFFF}Select you Origin", "Argentina\nEspaña\nChile\nColombia\nVenezuela\nParaguay\nUruguay\nMexico\nEl Salvador\nBrazil\nPeru", "Select", "");
- }
- case 5:
- {
- PlayerInformation[playerid][pAge] = 21;
- ShowPlayerDialog(playerid, SOrigin, DIALOG_STYLE_LIST, "{FFFFFF}Select you Origin", "Argentina\nEspaña\nChile\nColombia\nVenezuela\nParaguay\nUruguay\nMexico\nEl Salvador\nBrazil\nPeru", "Select", "");
- }
- case 6:
- {
- PlayerInformation[playerid][pAge] = 22;
- ShowPlayerDialog(playerid, SOrigin, DIALOG_STYLE_LIST, "{FFFFFF}Select you Origin", "Argentina\nEspaña\nChile\nColombia\nVenezuela\nParaguay\nUruguay\nMexico\nEl Salvador\nBrazil\nPeru", "Select", "");
- }
- case 7:
- {
- PlayerInformation[playerid][pAge] = 23;
- ShowPlayerDialog(playerid, SOrigin, DIALOG_STYLE_LIST, "{FFFFFF}Select you Origin", "Argentina\nEspaña\nChile\nColombia\nVenezuela\nParaguay\nUruguay\nMexico\nEl Salvador\nBrazil\nPeru", "Select", "");
- }
- case 8:
- {
- PlayerInformation[playerid][pAge] = 24;
- ShowPlayerDialog(playerid, SOrigin, DIALOG_STYLE_LIST, "{FFFFFF}Select you Origin", "Argentina\nEspaña\nChile\nColombia\nVenezuela\nParaguay\nUruguay\nMexico\nEl Salvador\nBrazil\nPeru", "Select", "");
- }
- case 9:
- {
- PlayerInformation[playerid][pAge] = 25;
- ShowPlayerDialog(playerid, SOrigin, DIALOG_STYLE_LIST, "{FFFFFF}Select you Origin", "Argentina\nEspaña\nChile\nColombia\nVenezuela\nParaguay\nUruguay\nMexico\nEl Salvador\nBrazil\nPeru", "Select", "");
- }
- case 10:
- {
- PlayerInformation[playerid][pAge] = 26;
- ShowPlayerDialog(playerid, SOrigin, DIALOG_STYLE_LIST, "{FFFFFF}Select you Origin", "Argentina\nEspaña\nChile\nColombia\nVenezuela\nParaguay\nUruguay\nMexico\nEl Salvador\nBrazil\nPeru", "Select", "");
- }
- }
- }
- return 1;
- }
- //
- //====[Dialog Origin]====//
- case SOrigin:
- {
- if(response)
- {
- switch(listitem){
- case 0:
- {
- PlayerInformation[playerid][pOrigin] = 1;
- GameTextForPlayer(playerid, "~w~You were born in ~R~Argentina", 5000, 3);
- }
- case 1:
- {
- PlayerInformation[playerid][pOrigin] = 2;
- GameTextForPlayer(playerid, "~w~You were born in ~R~España", 5000, 3);
- }
- case 2:
- {
- PlayerInformation[playerid][pOrigin] = 3;
- GameTextForPlayer(playerid, "~w~You were born in ~R~Chile", 5000, 3);
- }
- case 3:
- {
- PlayerInformation[playerid][pOrigin] = 4;
- GameTextForPlayer(playerid, "~w~You were born in ~R~Colombia", 5000, 3);
- }
- case 4:
- {
- PlayerInformation[playerid][pOrigin] = 5;
- GameTextForPlayer(playerid, "~w~You were born in ~R~Venezuela", 5000, 3);
- }
- case 5:
- {
- PlayerInformation[playerid][pOrigin] = 6;
- GameTextForPlayer(playerid, "~w~You were born in ~R~Paraguay", 5000, 3);
- }
- case 6:
- {
- PlayerInformation[playerid][pOrigin] = 7;
- GameTextForPlayer(playerid, "~w~You were born in ~R~Uruguay", 5000, 3);
- }
- case 7:
- {
- PlayerInformation[playerid][pOrigin] = 8;
- GameTextForPlayer(playerid, "~w~You were born in ~R~Mexico", 5000, 3);
- }
- case 8:
- {
- PlayerInformation[playerid][pOrigin] = 9;
- GameTextForPlayer(playerid, "~w~You were born in ~R~El salvador", 5000, 3);
- }
- case 9:
- {
- PlayerInformation[playerid][pOrigin] = 10;
- GameTextForPlayer(playerid, "~w~You were born in ~R~Brasil", 5000, 3);
- }
- case 10:
- {
- PlayerInformation[playerid][pOrigin] = 11;
- GameTextForPlayer(playerid, "~w~You were born in ~R~Peru", 5000, 3);
- }
- }
- }
- SendClientMessage(playerid,-1," Home");
- SendClientMessage(playerid,-1,"Welcome to blank script");
- SendClientMessage(playerid,-1,"Please read the tutorial");
- SendClientMessage(playerid,-1,"Press enter please!");
- PTuto[playerid] = 1;
- return 1;
- }
- case Register:
- {
- if (!strlen(inputtext)) return ShowPlayerDialog(playerid, Register, DIALOG_STYLE_INPUT, "{00FF00}Role Play ", "{FFFFFF}Please,Enter Password from account", "Register", "Exit");
- new INI:File = INI_Open(UserPath(playerid));
- INI_SetTag(File,"data");
- INI_WriteInt(File,"Password",udb_hash(inputtext));
- INI_WriteInt(File,"Money",0);
- INI_WriteInt(File,"Tutorial",0);
- INI_WriteInt(File,"Admin",0);
- INI_WriteInt(File,"Sex",0);
- INI_WriteInt(File,"Age",0);
- INI_WriteInt(File,"Origin",0);
- INI_WriteInt(File,"Faction",0);
- INI_Close(File);
- if (!response) return Kick(playerid);//Click in exit kick it
- Logued[playerid] = 1;
- SetSpawnInfo(playerid, 0, 0, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0);
- SpawnPlayer(playerid);
- }
- case Login:
- {
- if ( !response ) return Kick ( playerid );
- if( response )
- {
- if(udb_hash(inputtext) == PlayerInformation[playerid][pPassword])
- {
- INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);//Load user path
- GivePlayerMoney(playerid, PlayerInformation[playerid][pMoney]);
- Logued[playerid] = 1;
- SetSpawnInfo(playerid, 0, 0, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0);
- SpawnPlayer(playerid);
- }
- else
- {
- ShowPlayerDialog(playerid, 25, DIALOG_STYLE_MSGBOX, "{FFFFFF}Role Play {FFFFFF}|", "{FF0000}You password is incorrect you kicked!!", "Acept", "");
- }
- return 1;
- }
- }
- }
- return 1;
- }
- public OnPlayerConnect(playerid)
- { //reset player variables
- Logued[playerid] = 0;
- BigEar[playerid] = 0;
- PlayerInformation[playerid][pTutorial] = 0;
- PlayerInformation[playerid][pMoney] = 0;
- PlayerInformation[playerid][pAdmin] = 0;
- PlayerInformation[playerid][pSex] = 0;
- PlayerInformation[playerid][pAge] = 0;
- PlayerInformation[playerid][pOrigin] = 0;
- PlayerInformation[playerid][pFaction] = 0;
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- if(EnTuto[playerid] == 1)
- {
- SendClientMessage(playerid, -1,"{D30700}You silenced time of tutorial!.");
- return 0;
- }
- new string[100];//Maximun caracthers
- format(string, sizeof(string), "%s Says: %s",NamePlayerEx(playerid), text);
- ProxDetector(10.0, playerid, string,TALK,TALK2,TALK3,TALK4,TALK5);
- return 0;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- Dead[playerid] = true;//active variable player is setpos from hospital!
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- if(Logued[playerid] == 0) return SendClientMessage(playerid,-1,"Sorry!for play in this server need login!!");//This is for evite bug
- if(PlayerInformation[playerid][pTutorial] == 0)
- {
- TogglePlayerControllable(playerid,0);
- ShowPlayerDialog(playerid,SSex,DIALOG_STYLE_MSGBOX,"{FFFFFF}Select your Sex please","{00FFCC}¿Yur sex.. is, MALE OR FEMALE?","MALE","FEMALE");
- return 1;
- }
- if(PlayerInformation[playerid][pFaction] == 1)
- {
- //funtions for spawn faction one!
- return 1;
- }
- else if(PlayerInformation[playerid][pFaction] == 2)
- {
- //funtions for spawn faction two!
- return 1;
- }
- if(Dead[playerid] == true)
- {
- SetPlayerPos(playerid,Hospital);
- GivePlayerMoney(playerid, -500);//-500 MONEY
- SendClientMessage(playerid,-1,"You dead.. we will not remember anything at the hospital , I charge $ 500");
- Dead[playerid] = false;
- return 1;
- }
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)// this is very important, if you get used to the button nothing happens spawn spawn no ..
- {
- return 0;//leave it at zero, changing one spawn button worked and created a bugging
- }
- public OnGameModeInit()
- {
- SetGameModeText("Roleplay blank script");
- SendRconCommand("Samp server");
- SendRconCommand("Los santos");
- ManualVehicleEngineAndLights();
- ShowPlayerMarkers(0);//desactive markers
- DisableInteriorEnterExits();//deleted enter and exit whit gta sa
- return 1;
- }
- //========================///
- public OnPlayerDisconnect(playerid,reason)
- {
- new INI:File = INI_Open(UserPath(playerid));
- INI_SetTag(File,"data");//This at tag
- INI_WriteInt(File,"Money",GetPlayerMoney(playerid));
- INI_WriteInt(File,"Tutorial",PlayerInformation[playerid][pTutorial]);
- INI_WriteInt(File,"Admin",PlayerInformation[playerid][pAdmin]);
- INI_WriteInt(File,"Sex",PlayerInformation[playerid][pSex]);
- INI_WriteInt(File,"Age",PlayerInformation[playerid][pAge]);
- INI_WriteInt(File,"Origin",PlayerInformation[playerid][pOrigin]);
- INI_WriteInt(File,"Faction",PlayerInformation[playerid][pFaction]);
- INI_Close(File);
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- if(fexist(UserPath(playerid)))
- {
- Logued[playerid] = 0;
- INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);//
- ShowPlayerDialog(playerid, Login, DIALOG_STYLE_PASSWORD, "{009999}Login {FFFFFF}|", "{009999}Tipe your password for loguin in", "Conect", "Cancel");
- }
- else
- {
- ShowPlayerDialog(playerid, Register, DIALOG_STYLE_PASSWORD, "{009999}Register {FFFFFF}| ", "{009999}Please select password from you account", "Register", "Cancel");
- }
- SetPlayerPos(playerid, 1809.1567,-1846.6804,39.8038);
- SetPlayerCameraPos(playerid, 1810.8529,-1844.0466,19.0966);
- SetPlayerCameraLookAt(playerid, 1810.8529,-1844.0466,19.0966);
- return 1;
- }
- stock NamePlayerEx(playerid)
- {
- new Name[24];
- GetPlayerName(playerid,Name,24);
- new N[24];
- strmid(N,Name,0,strlen(Name),24);
- for(new i = 0; i < MAX_PLAYER_NAME; i++)
- {
- if (N [i] == '_') N[i] = ' ';
- }
- return N;
- }
- ///////
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if(PTuto[playerid] >= 1)
- {
- if(newkeys == KEY_SECONDARY_ATTACK)
- {
- if(PuedeP[playerid] == 1)
- {
- SendClientMessage(playerid, -1,"{D30700}Sorry 10 seconds please for new concept.");
- return 1;
- }
- Tuto(playerid);
- return 1;
- }
- return 1;
- }
- return 0;
- }
- public Tuto(playerid)
- {
- switch(PTuto[playerid])
- {
- case 1:
- {
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- EnTuto[playerid] = 1;
- PuedeP[playerid] = 1;
- SetTimerEx("PuedePTimer", 5000, 0, "d", playerid);
- SetPlayerPos(playerid, 1661.2817,-1496.6858,106.2865);
- SetPlayerCameraPos(playerid, 1661.2817,-1496.6858,106.2865);
- SetPlayerCameraLookAt(playerid,1598.6127,-1358.9615,100.0464);
- SendClientMessage(playerid, -1,"{D30700}One step the tutorial.");
- PTuto[playerid] ++;
- }
- case 2:
- {
- PuedeP[playerid] = 1;
- SetTimerEx("PuedePTimer", 5000, 0, "d", playerid);
- SendClientMessage(playerid, -1,"{D30700}Second step the tutorial.");
- PTuto[playerid] ++;
- }
- case 3:
- {
- PuedeP[playerid] = 1;
- SetTimerEx("PuedePTimer", 5000, 0, "d", playerid);
- InterpolateCameraPos(playerid, 1529.668701, -1676.500488, 18.162904, 1205.580200, -1323.094360, 20.972612, 3000);
- InterpolateCameraLookAt(playerid, 1534.656372, -1676.352539, 17.845149, 1200.686767, -1323.198364, 19.950950, 3000);
- SendClientMessage(playerid, -1,"{D30700}third step the tutorial.");
- PTuto[playerid] ++;
- }
- case 4:
- {
- PuedeP[playerid] = 1;
- SetTimerEx("PuedePTimer", 5000, 0, "d", playerid);
- SendClientMessage(playerid, -1,"{D30700}Four step the tutorial.");
- PTuto[playerid] ++;
- }
- case 5:
- {
- PuedeP[playerid] = 1;
- SetTimerEx("PuedePTimer", 5000, 0, "d", playerid);
- InterpolateCameraPos(playerid, 1820.795288, -1885.217041, 33.298183, 1480.225097, -1720.986450, 26.222684, 3000);
- InterpolateCameraLookAt(playerid, 1816.722534, -1887.284301, 31.263662, 1480.217895, -1725.824707, 24.961456, 3000);
- SendClientMessage(playerid, -1,"{D30700}Five step the tutorial.");
- PTuto[playerid] ++;
- }
- case 6:
- {
- SendClientMessage(playerid, -1,"{D30700}Finish step the tutorial.");
- PuedeP[playerid] = 1;
- SetTimerEx("PuedePTimer", 5000, 0, "d", playerid);
- PTuto[playerid] = 0;
- PlayerInformation[playerid][pTutorial] = 1;
- GivePlayerMoney(playerid, 1500);
- }
- }
- return 1;
- }
- forward PuedePTimer(playerid);
- public PuedePTimer(playerid)
- {
- PuedeP[playerid] = 0;
- return 1;
- }
- ///////////
- public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
- {
- if(IsPlayerConnected(playerid))
- {
- new Float:posx, Float:posy, Float:posz;
- new Float:oldposx, Float:oldposy, Float:oldposz;
- new Float:tempposx, Float:tempposy, Float:tempposz;
- GetPlayerPos(playerid, oldposx, oldposy, oldposz);
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) && (GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i)))
- {
- if(!BigEar[i])
- {
- GetPlayerPos(i, posx, posy, posz);
- tempposx = (oldposx -posx);
- tempposy = (oldposy -posy);
- tempposz = (oldposz -posz);
- if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
- {
- SendClientMessage(i, col1, string);
- }
- else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
- {
- SendClientMessage(i, col2, string);
- }
- else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
- {
- SendClientMessage(i, col3, string);
- }
- else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
- {
- SendClientMessage(i, col4, string);
- }
- else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
- {
- SendClientMessage(i, col5, string);
- }
- }
- else
- {
- SendClientMessage(i, col1, string);
- }
- }
- }
- }
- return 1;
- }
- //=====[Comands]=========//
- //Comands for admin
- YCMD:makeleader(playerid, params[], help)
- {
- if (help) SendClientMessage(playerid, 0xFF0000AA, "MAKE LEADER");
- else
- {
- new ID,FACTION;
- if(PlayerInformation[playerid][pAdmin] < 4) return SendClientMessage(playerid,-1,"Not autorized!");
- if(sscanf(params, "ud", ID,FACTION) )return SendClientMessage(playerid,-1,"Uso: /makeleader [ID] [Facc]");
- if(!IsPlayerConnected(ID)) return SendClientMessage(playerid,-1,"Player offline/ID incorrect");
- {
- PlayerInformation[ID][pFaction] = FACTION;
- return 1;
- }
- }
- return 1;
- }
- YCMD:makeadmin(playerid, params[], help)
- {
- if (help) SendClientMessage(playerid, 0xFF0000AA, "MAKEADMIN");
- else
- {
- new ID,ADMIN;
- if(PlayerInformation[playerid][pAdmin] < 10) return SendClientMessage(playerid,-1,"Not autorized!");
- if(sscanf(params, "ud", ID,ADMIN) )return SendClientMessage(playerid,-1,"Uso: /makeadmin [ID] [ADMLEVEL]");
- if(!IsPlayerConnected(ID)) return SendClientMessage(playerid,-1,"Player offline/ID incorrect");
- {
- PlayerInformation[ID][pAdmin] = ADMIN;
- return 1;
- }
- }
- return 1;
- }
- YCMD:givemoney(playerid, params[], help)
- {
- if (help) SendClientMessage(playerid, 0xFF0000AA, "GIVEMONEY");
- else
- {
- new ID,PLATA;
- if(PlayerInformation[playerid][pAdmin] < 10) return SendClientMessage(playerid,-1,"Not autorized!");
- if(sscanf(params, "ud", ID,PLATA) )return SendClientMessage(playerid,-1,"Uso: /givemoney [ID] [Money]");
- if(!IsPlayerConnected(ID)) return SendClientMessage(playerid,-1,"Player offline/ID incorrect");
- {
- PlayerInformation[ID][pMoney] = PLATA;
- GivePlayerMoney(ID,PLATA);
- return 1;
- }
- }
- return 1;
- }
- //=========[Canal /me]=========//
- YCMD:me(playerid, params[], help)
- {
- if (help) SendClientMessage(playerid, 0xFF0000AA, "ROLEPLAY ME BASIC ");
- else
- {
- if(!sscanf(params, "s[128]", params[0]))
- {
- new string[128];
- format(string, sizeof(string), "* %s %s.", NamePlayerEx(playerid), params[0]);
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); }
- else SendClientMessage(playerid, COLOR_GRAD2, "USE: /me <Actión>");
- }
- return 1;
- }
- //======[Canal /do]============//
- YCMD:do(playerid, params[], help)
- {
- if (help) SendClientMessage(playerid, 0xFF0000AA, "DO BASIC ROLEPLAY ");
- else
- {
- if(!sscanf(params, "s[128]", params[0]))
- {
- new string[128];
- format(string, sizeof(string), "* %s (( %s )).", NamePlayerEx(playerid), params[0]);
- ProxDetector(30.0, playerid, string, 0xB6DB22FF,0xB6DB22FF,0xB6DB22FF,0xB6DB22FF,0xB6DB22FF);
- } else SendClientMessage(playerid, COLOR_GRAD2, "USE: /do <Actión>");
- }
- return 1;
- }
- //=======[WHISP /G]===========//
- YCMD:g(playerid, params[], help)
- {
- if (help) SendClientMessage(playerid, 0xFF0000AA, "whisp ");
- else
- {
- if(!sscanf(params, "s[128]", params[0]))
- {
- new string[128];
- format(string, sizeof(string), "%s whisp: ¡¡ %s !!", NamePlayerEx(playerid), params[0]);
- ProxDetector(30.0, playerid, string,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_FADE1,COLOR_FADE2);
- } else SendClientMessage(playerid, COLOR_GRAD2, "USE: /g FOR WISP");
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement