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>
- #include <sscanf2>
- #include <zcmd>
- #define COLOR_RED 0xFF0000AA
- #define COLOR_SILVER 0xC0C0C0AA
- #define COLOR_WHITE 0xFFFFFFAA
- #define COLOR_GREEN 0x00FF00CE
- #define CHLAMYDIA 3
- new chlamydia[MAX_PLAYERS];
- new time;
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Rob and Rape Command Made By Ahmed_Nezoo");
- print("--------------------------------------\n");
- return 1;
- }
- CMD:rob(playerid, params[])
- {
- new targetid;
- new rob = random(10);
- if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_WHITE, "Usage: /rob [id]");
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_RED, "This player is not connected");
- new Float:x, Float:y, Float:z;
- GetPlayerPos(targetid, x, y, z);
- if(!IsPlayerInRangeOfPoint(playerid, 5, x, y, z)) return SendClientMessage(playerid, COLOR_RED, "This player is too far away");
- if(GetPlayerMoney(targetid) < 1000) return SendClientMessage(playerid, COLOR_RED, "This player doesn't have enough money");
- new money = GetPlayerMoney(targetid);
- if(rob == 0 || rob == 1)
- {
- new name[MAX_PLAYER_NAME], string[24+MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- new name2[MAX_PLAYER_NAME], string1[24+MAX_PLAYER_NAME];
- GetPlayerName(targetid, name2, sizeof(name2));
- GivePlayerMoney(playerid, money / 10);
- GivePlayerMoney(targetid, -money / 10);
- format(string,sizeof(string),"%s has robbed %s",name, name2);
- SendClientMessageToAll(COLOR_GREEN,string);
- format(string,sizeof(string),"You robbed $%d", money/10);
- SendClientMessage(playerid,COLOR_SILVER,string);
- format(string,sizeof(string),"You got robbed and lost $%d", money/10);
- SendClientMessage(targetid,COLOR_SILVER,string);
- }
- else if(rob == 2 || rob == 4)
- {
- new name[MAX_PLAYER_NAME], string[24+MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- new name2[MAX_PLAYER_NAME], string1[24+MAX_PLAYER_NAME];
- GetPlayerName(targetid, name2, sizeof(name2));
- GivePlayerMoney(playerid, money / 20);
- GivePlayerMoney(targetid, -money / 20);
- format(string,sizeof(string),"%s has robbed %s",name, name2);
- SendClientMessageToAll(COLOR_GREEN,string);
- format(string,sizeof(string),"You robbed $%d", money/20);
- SendClientMessage(playerid,COLOR_SILVER,string);
- format(string,sizeof(string),"You got robbed and lost $%d", money/20);
- SendClientMessage(targetid,COLOR_SILVER,string);
- }
- else if(rob == 5 || rob == 6)
- {
- new name[MAX_PLAYER_NAME], string[24+MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- new name2[MAX_PLAYER_NAME], string1[24+MAX_PLAYER_NAME];
- GetPlayerName(targetid, name2, sizeof(name2));
- GivePlayerMoney(playerid, money / 5);
- GivePlayerMoney(targetid, -money / 5);
- format(string,sizeof(string),"%s has robbed %s",name, name2);
- SendClientMessageToAll(COLOR_GREEN,string);
- format(string,sizeof(string),"You robbed $%d", money/5);
- SendClientMessage(playerid,COLOR_SILVER,string);
- format(string,sizeof(string),"You got robbed and lost $%d", money/5);
- SendClientMessage(targetid,COLOR_SILVER,string);
- }
- else
- {
- new name[MAX_PLAYER_NAME], string[24+MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- new name2[MAX_PLAYER_NAME], string1[24+MAX_PLAYER_NAME];
- GetPlayerName(targetid, name2, sizeof(name2));
- format(string,sizeof(string),"%s noticed you, Run away or he can kill you !", name2);
- SendClientMessage(playerid, COLOR_RED, string);
- format(string,sizeof(string),"%s tried to rob you and faile you may now kill him !", name);
- SendClientMessage(targetid, COLOR_RED, string);
- format(string1,sizeof(string1),"%s tried to rob %s and failed", name, name2);
- SendClientMessageToAll(COLOR_GREEN,string1);
- }
- return 1;
- }
- CMD:rape(playerid, params[])
- {
- new string[256];
- new targetid;
- if(sscanf(params, "u", targetid))
- {
- SendClientMessage(playerid, COLOR_WHITE, "Usage: /rape [id]");
- }
- else
- {
- new name[MAX_PLAYER_NAME], string[24+MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- new name2[MAX_PLAYER_NAME], string1[24+MAX_PLAYER_NAME];
- GetPlayerName(targetid, name2, sizeof(name2));
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_RED, "This player is not connected");
- if(targetid == playerid) return SendClientMessage(playerid, COLOR_RED, "You can not rape yourself.");
- new Float:X, Float:Y, Float:Z;
- GetPlayerPos(targetid ,X,Y,Z);
- if(!IsPlayerInRangeOfPoint(targetid,5,X,Y,Z)) return SendClientMessage(playerid, COLOR_RED,"This player is too far away");
- new raperand = random(5);
- if(raperand == 1 || raperand == 2)
- {
- format(string, sizeof(string), "%s has attempted to rape you!", name);
- SendClientMessage(targetid, COLOR_GREEN, string);
- }
- else if(raperand == 3 || raperand == 5)
- {
- if(!chlamydia[targetid])
- {
- chlamydia[targetid] = 1;
- new Float:health;
- GetPlayerHealth(targetid,health);
- SetPlayerHealth(targetid, health-5-random(10));
- format(string, 256, "Your successfully raped %s and infected him with Chlamydia", name2);
- SendClientMessage(playerid, COLOR_GREEN, string);
- time = SetTimerEx("rape", 30000, true, "i", targetid);
- }
- }
- else
- {
- new Float:health;
- GetPlayerHealth(targetid,health);
- SetPlayerHealth(targetid, health-5-random(15));
- format(string,sizeof(string), "You successfully raped %s", name2);
- SendClientMessage(playerid, -1, string);
- format(string, sizeof(string), "%s has successfully raped you!", name);
- SendClientMessage(targetid, COLOR_GREEN, string);
- time = SetTimerEx("rape", 30000, true, "i", targetid);
- }
- }
- return 1;
- }
- forward rape(playerid);
- public rape(playerid)
- {
- new Float:health;
- GetPlayerHealth(playerid,health);
- SetPlayerHealth(playerid, health-5-random(10));
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- if(chlamydia[playerid])
- {
- KillTimer(time);
- }
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- #endif
Advertisement
Add Comment
Please, Sign In to add comment