Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This is a comment
- // uncomment the line below if you want to write a filterscript
- //#define FILTERSCRIPT
- #include <a_samp>
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- CMD:revive(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 3)
- {
- new string[128], giveplayerid;
- if(sscanf(params, "u", giveplayerid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /revive [playerid]");
- if(IsPlayerConnected(giveplayerid))
- {
- if(GetPVarInt(giveplayerid, "Injured") == 1)
- {
- format(string, sizeof(string), " You have revived %s.", GetPlayerNameEx(giveplayerid));
- SendClientMessageEx(playerid, COLOR_WHITE, string);
- SendClientMessageEx(giveplayerid, COLOR_WHITE, "You have been revived by an Admin.");
- KillEMSQueue(giveplayerid);
- ClearAnimations(giveplayerid);
- SetPlayerHealth(giveplayerid, 100);
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GRAD2, "That player is not injured!");
- }
- }
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
- }
- return 1;
- public OnFilterScriptExit()
- {
- return 1;
- }
- #endif
Add Comment
Please, Sign In to add comment