Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <zcmd>
- #include <sscanf>
- #define MESSAGE "im gay" //Change to your own likings
- new noexit[MAX_PLAYERS], toggle[MAX_PLAYERS], text[MAX_PLAYERS];
- //Trolling Tools
- CMD:fakechat(playerid, params[])
- {
- new id, msg[256], string[256];
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "SERVER: Unknown command.");
- if(sscanf(params,"ds",id,msg)) return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /fakechat [id] [msg]");
- format(string, sizeof(string), "%s",msg);
- SendPlayerMessageToAll(id, string);
- return 1;
- }
- CMD:bubblechat(playerid, params[])
- {
- new id, msg[256];
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "SERVER: Unknown command.");
- if(sscanf(params,"ds",id,msg)) return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /bubblechat [id] [msg]");
- SetPlayerChatBubble(id, msg, -1, 100.0, 9999999);
- return 1;
- }
- CMD:undercover(playerid, params[])
- {
- new msg[256], string[256], string1[128], string2[256];
- new name1[MAX_PLAYER_NAME];
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "SERVER: Unknown command.");
- if(sscanf(params,"s",msg)) return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /undercover [newname]");
- format(string, sizeof(string), "%s",msg);
- GetPlayerName(playerid, name1, sizeof(name1)); //here, enter your ENTER/EXIT messages, something like this:
- format(string1, sizeof(string1), "%s [%d] has left the server.",name1,playerid);
- format(string2, sizeof(string2), "%s [%d] has joined the server.",name1,playerid);
- SendClientMessageToAll(-1, string1);
- SendClientMessageToAll(-1, string2); // NOTE: DO NOT USE THE SAME ENTER/EXIT MESSAGES, SET TO YOUR OWN!
- SetPlayerName(playerid, string);
- return 1;
- }
- CMD:putinveh(playerid, params[])
- {
- new id;
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "SERVER: Unknown command.");
- if(sscanf(params,"d",id)) return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /putinveh [id]");
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You must be on vehicle!");
- if(noexit[id] == 1) noexit[id] = 0;
- noexit[id] = 1;
- PutPlayerInVehicle(id, GetPlayerVehicleID(playerid), 1);
- return 1;
- }
- CMD:toghs(playerid, params[])
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "SERVER: Unknown command.");
- if(toggle[playerid] == 1) {
- SendClientMessage(playerid, -1, "Toggle HS off.");
- toggle[playerid] = 0;
- return 1; }
- if(toggle[playerid] == 0) {
- SendClientMessage(playerid, -1, "Toggle HS on.");
- SendClientMessage(playerid, -1, "To use this shitty headshot, just shoot a player even if it's on the body, and boom!");
- toggle[playerid] = 1;
- return 1; }
- return 1;
- }
- CMD:togtxt(playerid, params[])
- {
- if(!IsPlayerAdmin(playerid)) return 0;
- new id;
- if(sscanf(params,"d",id)) return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /togtxt [id]");
- if(text[id] == 1) {
- SendClientMessage(playerid, -1, "Toggle text off.");
- text[id] = 0;
- return 1; }
- if(text[id] == 0) {
- SendClientMessage(playerid, -1, "Toggle text on.");
- text[id] = 1;
- return 1; }
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- if(text[playerid] == 1) {
- new pText[144];
- format(pText, sizeof (pText), "%s", MESSAGE);
- SendPlayerMessageToAll(playerid, pText);
- return 0; }// ignore the default text and send the custom one
- return 1;
- }
- public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
- {
- //You must hit the player for auto headshot
- if(weaponid == 34 && toggle[playerid] == 1 && hittype == BULLET_HIT_TYPE_PLAYER) {
- SetPlayerHealth(hitid, 0.0);
- GameTextForPlayer(hitid, "~r~headshot!", 1000, 5); }
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- if(noexit[playerid] == 1) {
- PutPlayerInVehicle(playerid, GetPlayerVehicleID(playerid), 1); }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement