Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Special Action Filter-Script by: Abagail */
- /* This allows you to set, and get a (giveplayerid) player's Special Action. */
- /* This was made mostly for testing purposes. */
- #include <a_samp>
- #include zcmd
- #include sscanf2
- CMD:getspecialaction(playerid, params[])
- {
- if(!IsPlayerAdmin(playerid)) return 0;
- new giveplayerid;
- if (sscanf(params, "u", giveplayerid))
- {
- new string[128];
- format(string, sizeof(string), "Your Special Action: %s(%s)", GetSpecialActionName(playerid), GetPlayerSpecialAction(playerid));
- SendClientMessage(playerid, -1, string);
- }
- if(IsPlayerConnected(giveplayerid))
- {
- new string[128];
- format(string, sizeof(string), "%s's(%d) Special Action: %s(%s)", GetName(giveplayerid), giveplayerid, GetSpecialActionName(playerid), GetPlayerSpecialAction(playerid));
- SendClientMessage(playerid, -1, string);
- // else } SendClientMessage(playerid, -1, "They aren't connected.");
- }
- return 1;
- }
- CMD:setspecialaction(playerid, params[])
- {
- if(!IsPlayerAdmin(playerid)) return 0;
- new giveplayerid, action;
- if (sscanf(params, "u", giveplayerid, action)) return ActionMsg(playerid); // return SendClientMessage(playerid, -1, "CMD:setspecialaction [player] [action]");
- if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, -1, "They aren't connected.");
- if(action = 0) SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
- if(action = 1) SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
- if(action = 2) SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DANCE1);
- if(action = 3) SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DANCE2);
- if(action = 4) SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DANCE3);
- if(action = 5) SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DANCE4);
- if(action = 6) SetPlayerSpecialAction(playerid, SPECIAL_ACTION_HANDSUP);
- if(action = 7) SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USECELLPHONE);
- if(action = 8) SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SITTING);
- if(action = 9) SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE);
- if(action = 10) SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
- if(action = 11) SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY);
- if(action = 12) SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
- if(action = 13) SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
- if(action = 14) SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CUFFED);
- if(action = 15) SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
- return ActionSet(playerid, giveplayerid);
- }
- stock GetName(playerid)
- {
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- return name;
- }
- stock ActionSet(playerid, giveplayerid)
- {
- new string[128];
- format(string, sizeof(string), "You have set %s(%d)'s special action to %s(%s)", GetName(giveplayerid), giveplayerid, GetSpecialActionName(giveplayerid), GetPlayerSpecialAction(giveplayerid));
- SendClientMessage(playerid, -1, string);
- format(string, sizeof(string), "An Administrator has set your special action to %s(%s)", GetSpecialActionName(giveplayerid), GetPlayerSpecialAction(giveplayerid));
- SendClientMessage(playerid, -1, string);
- }
- stock ActionMsg(playerid)
- {
- SendClientMessage(playerid, -1, "USAGE: /setspecialaction [player] [action]");
- SendClientMessage(playerid, -1, "Actions: 0 - None | 1 - Use Jetpack, 2 - Dance1 | 3, Dance2, | 4 - Dance3, | 5, Dance4, | 6, Hands Up, ");
- SendClientMessage(playerid, -1, "Actions: 7 - UsePhone 8 - Sit(ting) 9 - PutAway Phone 10 - Drinking(Beer) 11 - Smoking Cigar(SmokeCiggy)");
- SendClientMessage(playerid, -1, "Actions: 12 - Drinking(Wine) 13 - Drinking(Sprunk), 14, - Cuffed(Hands Behind Back), 15 - Carry(ing)");
- }
- stock GetSpecialActionName(playerid)
- {
- new action = GetPlayerSpecialAction(playerid);
- new name[128];
- if(action == SPECIAL_ACTION_NONE) format(name, sizeof(name), "None");
- else if(action == SPECIAL_ACTION_USEJETPACK) format(name, sizeof(name), "Using Jetpack");
- else if(action == SPECIAL_ACTION_DANCE1) format(name, sizeof(name), "Dance 1");
- else if(action == SPECIAL_ACTION_DANCE2) format(name, sizeof(name), "Dance 2");
- else if(action == SPECIAL_ACTION_DANCE3) format(name, sizeof(name), "Dance 3");
- else if(action == SPECIAL_ACTION_DANCE4) format(name, sizeof(name), "Dance 4");
- else if(action == SPECIAL_ACTION_HANDSUP) format(name, sizeof(name), "Hands Up");
- else if(action == SPECIAL_ACTION_USECELLPHONE) format(name, sizeof(name), "Using Cell-Phone");
- else if(action == SPECIAL_ACTION_SITTING) format(name, sizeof(name), "Sitting");
- else if(action == SPECIAL_ACTION_STOPUSECELLPHONE) format(name, sizeof(name), "Putting Away Cell-Phone");
- else if(action == SPECIAL_ACTION_DRINK_BEER) format(name, sizeof(name), "Drinking Beer");
- else if(action == SPECIAL_ACTION_SMOKE_CIGGY) format(name, sizeof(name), "Smoking Cigar(Smoke Ciggy)");
- else if(action == SPECIAL_ACTION_DRINK_WINE) format(name, sizeof(name), "Drinking Wine");
- else if(action == SPECIAL_ACTION_DRINK_SPRUNK) format(name, sizeof(name), "Drinking Sprunk");
- else if(action == SPECIAL_ACTION_CUFFED) format(name, sizeof(name), "Cuffed(Handcuffed - hands behind (your)(their) back.");
- else if(action == SPECIAL_ACTION_CARRY) format(name, sizeof(name), "Carry(Carry(ing)");
- return name;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement