Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /a help
- /a j
- /a remove
- //==============================================================================
- #include <a_samp>
- #include <dini>
- //==============================================================================
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Activity System ");
- print("--------------------------------------\n");
- return 1;
- }
- //==============================================================================
- new RGM[MAX_PLAYERS];
- new GM[MAX_PLAYERS];
- new ActivityTeleports;
- new JoinTime2[MAX_PLAYERS];
- new JoinTime[MAX_PLAYERS];
- new ActQ[MAX_PLAYERS];
- new PlayerName[256];
- new ActiveName[128];
- new activity;
- //==============================================================================
- #define ActivityJoin 0x8e0c9ff
- #define Brown1 0xd11111ff
- #define ActivityManager 0xb2b3b2ff
- #define Green1 0x48c14ff
- #define RED 0xff0000ff
- #define White 0xFFFFFFAA
- #define yellow 0xFFFF00AA
- //==============================================================================
- #pragma tabsize 0
- //==============================================================================
- forward JoinTime1(playerid);
- //==============================================================================
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- new cmd[256];
- new idx;
- new tmp[256];
- new tmp1[256];
- new string[256];
- new id;
- new any;
- cmd = strtok(cmdtext,idx);
- //==============================================================================
- if(strcmp(cmd, "/Activity", true) == 0 || strcmp(cmd, "/a", true) == 0)
- {
- new string1[128];
- tmp = strtok(cmdtext,idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, yellow, "/Activity [Start] [End] [Change] [GiveMoney] [CloseTeleports] [OpenTeleports]:ìàãîéðéí");
- SendClientMessage(playerid, yellow, "[Quit] [CHeck] [Join] [Help] :ìùç÷ðéí");
- return 1;
- }
- if(strcmp(tmp, "Help", true) == 0 || strcmp(tmp, "H", true) == 0)
- {
- tmp = strtok(cmdtext,idx);
- if(!strlen(tmp)) return SendClientMessage(playerid, yellow, "/Activity Help [1-2] :öåøú ùéîåù");
- if(strcmp(tmp, "1", true) == 0)
- {
- SendClientMessage(playerid,0xff0000ff,"=================1================");
- SendClientMessage(playerid,yellow,"/Activity Start ActiveName [/A S] - ìàãîéï , äëøæä òì äôòìú ôòéìåú");
- SendClientMessage(playerid,yellow,"/Activity Change NewActiveName [/A C] - ìàãîéï , ùéðåé ôòéìåú");
- SendClientMessage(playerid,yellow,"/Activity Join [/A J] - ìùç÷ï/àãîéï , äöèøôåú ìôòéìåú");
- SendClientMessage(playerid,yellow,"/Activity End [/A E] - ìàãîéï , ñéåí äôòéìåú");
- SendClientMessage(playerid,yellow,"/Activity CAncle [/A CA] - ìàãîéï , áéèåì äôòéìåú");
- SendClientMessage(playerid,0xff0000ff,"=================1================");
- }
- if(strcmp(tmp, "2", true) == 0)
- {
- SendClientMessage(playerid,0xff0000ff,"=================2================");
- SendClientMessage(playerid,yellow,"/Activity GiveMoney [/A GM] - ðúéðú ôøñ ìîðöç");
- SendClientMessage(playerid,yellow,"/Activity OpenTeleports [/A CT] - ìàãîéï , ñâéøú äùéâåøéí ìôòéìåú");
- SendClientMessage(playerid,yellow,"/Activity OpenTeleports [/A OT] - ìàãîéï , ôúéçú äùéâåøéí ìôòéìåú");
- SendClientMessage(playerid,yellow,"/Activity CHeck [/A CH] - ìùç÷ï/ìàãîéï , áãé÷ú îöá äôòéìåú");
- SendClientMessage(playerid,yellow,"/Activity Quit [/A Q] - ìùç÷ï/àãîéï , éöéàä îäôòéìåú");
- SendClientMessage(playerid,0xff0000ff,"=================2================");
- }
- return 1;
- }
- if(strcmp(tmp, "CloseTeleports", true) == 0 || strcmp(tmp, "Ct", true) == 0)
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, White, "àúä ìà àãîéï ø÷åï");
- if(activity == 0) return SendClientMessage(playerid,White,"àéï ôòéìåú îåôòìú");
- if(ActivityTeleports == 0) return SendClientMessage(playerid,White,"äùéâåøéí ìôòéìåú ëáø ñâåøéí");
- format(string, sizeof(string),"äùéâåøéí ìôòéìåú %s äñúééîå òì éãé äîðäì",ActiveName);
- SendClientMessageToAll(0x48c14ff,string);
- GameTextForAll("~r~Activity ~b~Close Teleports~<~",20,1);
- ActivityTeleports = 0;
- return 1;
- }
- if(strcmp(tmp, "OpenTeleports", true) == 0 || strcmp(tmp, "Ot", true) == 0)
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, White, "àúä ìà àãîéï ø÷åï");
- if(activity == 0) return SendClientMessage(playerid,White,"àéï ôòéìåú îåôòìú");
- if(ActivityTeleports == 1) return SendClientMessage(playerid,White,"äùéâåøéí ìôòéìåú ëáø ôúåçéí");
- format(string, sizeof(string),"äùéâåøéí ìôòéìåú %s ðôúçå òì éãé äîðäì",ActiveName);
- SendClientMessageToAll(0x48c14ff,string);
- GameTextForAll("~r~Activity ~b~Open Teleports~<~",20,1);
- ActivityTeleports = 1;
- return 1;
- }
- if(strcmp(tmp, "Join", true) == 0 || strcmp(tmp, "j", true) == 0)
- {
- if(activity == 0) return SendClientMessage(playerid,White,"àéï ôòéìåú îåôòìú");
- if(ActivityTeleports == 0) return SendClientMessage(playerid,White,"äàçøàé ñâø àú äùéâåøéí ìôòéìåú åìëï àúä ìà éëåì ìäöèøó");
- if(JoinTime2[playerid] == 1) return SendClientMessage(playerid,White,"ëáø áé÷ùú ìäöèøó ìôòéìåú , çëä ã÷ä åá÷ù ùåá");
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(IsPlayerAdmin(i))
- {
- format(string1, sizeof(string1),"îá÷ù ìäöèøó ìôòéìåú %s[%d] äùç÷ï",GetName(playerid),playerid);
- SendClientMessage(i,0x8e0c9ff,string1);
- }
- }
- }
- SendClientMessage(playerid,0x8e0c9ff,"áé÷ùú ìäöèøó ìôòéìåú , çëä ùäàçøàé éöøó àåúê");
- GameTextForPlayer(playerid,"~r~Activity ~b~ Join !~<~",20,1);
- JoinTime[playerid] = SetTimerEx("JoinTime1", 60000, 0, "i", playerid);
- for(new i = 0; i<MAX_PLAYERS; i++) if(IsPlayerConnected(i)) JoinTime2[playerid] = 1;
- return 1;
- }
- if(strcmp(tmp, "cancle", true) == 0 || strcmp(tmp, "ca", true) == 0)
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, White, "àúä ìà àãîéï ø÷åï");
- if(activity == 0) return SendClientMessage(playerid, White, "àéï ôòéìåú îåôòìú");
- format(string1, sizeof(string1),"äôòéìåú %s äúáèìä òì éãé äàçøàé ôòéìåéåú/äîðäì",ActiveName);
- SendClientMessageToAll(0xff0000ff,string1);
- GameTextForAll("~r~Activity ~b~Cancle~<~",20,1);
- activity = 0;
- GM[id] = 0;
- RGM[id] = 0;
- KillTimer(JoinTime[id]);
- JoinTime2[playerid] = 0;
- return 1;
- }
- if(strcmp(tmp, "q", true) == 0 || strcmp(tmp, "quit", true) == 0)
- {
- if(activity == 0) return SendClientMessage(playerid, White, "àéï ôòéìåú îåôòìú");
- if(ActQ[playerid] == 0) return SendClientMessage(playerid, White, "ëáø éöàú îäôòéìåú");
- SpawnPlayer(playerid);
- SendClientMessage(playerid,0xd11111ff,"éöàú îäôòéìåú åìëï ùåâøú");
- ActQ[playerid] = 0;
- return 1;
- }
- if(strcmp(tmp, "Remove", true) == 0 || strcmp(tmp, "R", true) == 0)
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, White, "àúä ìà àãîéï ø÷åï");
- if(activity == 0) return SendClientMessage(playerid,White,"àéï ôòéìåú îåôòìú");
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) return SendClientMessage(playerid, yellow, "/Activity Remove [ID] :öåøú äùéîåù");
- id = strval(tmp);
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, White, "ùç÷ï æä ìà îçåáø");
- if(RGM[id] == 1) return SendClientMessage(playerid,White,"ëáø äñøú ùç÷ï æä îîðöç áôòéìåú");
- new Money = GetPVarInt(id, "GivenMoney");
- GivePlayerMoney(id, -Money);
- format(string,sizeof(string),"îîðöç áôòéìåú åìëï äëñó ùìå äåñø %s äñøú àú äùç÷ï",GetName(id));
- SendClientMessage(playerid,0x48c14ff, string);
- format(string,sizeof(string),"äñéø àåúê îîðöç áôòéìåú åìëï ëñôê äåñø %s äàãîéï",GetName(playerid));
- SendClientMessage(id,0x48c14ff, string);
- RGM[id] = 1;
- return 1;
- }
- if(strcmp(tmp, "GiveMoney", true) == 0 || strcmp(tmp, "GM", true) == 0)
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, White, "àúä ìà àãîéï ø÷åï");
- if(activity == 0) return SendClientMessage(playerid, White, "ëãé ìúú ìùç÷ï ôøñ öøéëä ìäéåú ôòéìåú îåôòìú");
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) return SendClientMessage(playerid, yellow, "/Activity GiveMoney(Gm) [id] [Money] :öåøú äùéîåù");
- id = strval(tmp);
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, White, "ùç÷ï æä ìà îçåáø");
- if(GM[id] == 1) return SendClientMessage(playerid,White,"ùç÷ï æä ëáø ÷éáì ôøñ äôòéìåú");
- tmp1 = strtok(cmdtext, idx);
- if(!strlen(tmp1)) return SendClientMessage(playerid, yellow, "/Activity GiveMoney ID [Money] :öåøú äùéîåù");
- any = strval(tmp1);
- if(any < 1 || any > 150000) return SendClientMessage(playerid, White, "ñëåí äôøñ çééá ìäéåú áéï 150000 - 1");
- any = strval(tmp1);
- GivePlayerMoney(id, any);
- SetPVarInt(playerid, "GivenMoney", any);
- format(string, sizeof(string),"%d ðéöç áôòéìåú å÷éáì àú äñëåí %s äùç÷ï", any, GetName(id));
- SendClientMessageToAll(0x48c14ff, string);
- format(string, sizeof(string),"~r~Activity Win ~b~ %s", GetName(id));
- GameTextForAll(string,50,1);
- GM[id] = 1;
- return 1;
- }
- if(strcmp(tmp, "Check", true) == 0 || strcmp(tmp, "ch", true) == 0)
- {
- if(activity == 0) return SendClientMessage(playerid, White, "àéï ôòéìåú îåôòìú");
- format(string1, sizeof(string1),"îðäì àú äôòéìåú %s %s äàçøàé",ActiveName,PlayerName);
- SendClientMessage(playerid,0xd11111ff,string1);
- return 1;
- }
- if(strcmp(tmp, "Change", true) == 0 || strcmp(tmp, "c", true) == 0)
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, White, "àúä ìà àãîéï ø÷åï");
- if(activity == 0) return SendClientMessage(playerid, yellow, "àéï ôòéìåú îåôòìú ùáàôùøåúê ìùðåú");
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[256];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- if(!strlen(result)) return SendClientMessage(playerid, yellow, "/Activity Change [ActivityNewName]");
- format(string1, sizeof(string1),"äôòéìåú ùåðúä ì%s òì éãé äàçøàé ôòéìåéåú/äîðäì",(result));
- SendClientMessageToAll(0xff0000ff,string1);
- GameTextForAll("~r~Activity ~b~ Change~<~",20,1);
- format(string1, sizeof(string1),"%s", (result));
- ActiveName = string1;
- return 1;
- }
- if(strcmp(tmp, "end", true) == 0 || strcmp(tmp, "e", true) == 0)
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, White, "àúä ìà àãîéï ø÷åï");
- if(activity == 0) return SendClientMessage(playerid, White, "àéï ôòéìåú îåôòìú");
- format(string1, sizeof(string1),"äôòéìåú %s äñúééîä òì éãé äàçøàé ôòéìåéåú/äîðäì",ActiveName);
- SendClientMessageToAll(0xff0000ff,string1);
- GameTextForAll("~r~Activity ~b~End~<~",20,1);
- activity = 0;
- GM[id] = 0;
- RGM[id] = 0;
- KillTimer(JoinTime[id]);
- JoinTime2[playerid] = 0;
- return 1;
- }
- if(strcmp(tmp, "start", true) == 0 || strcmp(tmp, "s", true) == 0)
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, White, "àúä ìà àãîéï ø÷åï");
- if(activity == 1) return SendClientMessage(playerid, White, "éù ôòéìåú îåôòìú , çëä ùúñúééí");
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[256];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- if(!strlen(result)) return SendClientMessage(playerid, yellow, "/Activity Start [ActivityName]");
- format(string1, sizeof(string1),"äôòéìåú %s äåôòìä òì éãé äàçøàé ôòéìåéåú/äîðäì",(result),GetName(playerid));
- SendClientMessageToAll(0xff0000ff,string1);
- SendClientMessageToAll(0xff0000ff,"/Activity Help äùéâåøéí ìôòéìåú ðôúçå àåèåîèéú - ëãé ìøàåú ô÷åãåú ðåñôåú ìôòéìåú");
- GameTextForAll("~r~Activity ~b~Start~<~",20,1);
- activity = 1;
- format(string1, sizeof(string1),"%s", (result));
- ActiveName = string1;
- format(string1, sizeof(string1),"%s", GetName(playerid));
- PlayerName = string1;
- ActivityTeleports = 1;
- for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i)) ActQ[i] = 1;
- return 1;
- }
- }
- return 0;
- }
- //==============================================================================
- stock SendAdminsMessage(color, const string[])
- {
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(!IsPlayerAdmin(i))
- {
- SendClientMessage(i, color, string);
- }
- }
- }
- return 1;
- }
- //==============================================================================
- stock GetName(playerid)
- {
- new Name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, Name, sizeof(Name));
- return Name;
- }
- //==============================================================================
- public JoinTime1(playerid)
- {
- SendClientMessage(playerid,0x48c14ff,"àúä éëåì ìá÷ù ìäöèøó ìôòéìåú ùåá");
- JoinTime2[playerid] = 0;
- return 1;
- }
- //==============================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement