Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- COMMAND:accept(playerid, params[])
- {
- new type[128],string[128],sendername[MAX_PLAYER_NAME],giveplayer[MAX_PLAYER_NAME], Float:x, Float:y, Float:z;
- if(sscanf(params, "s[128]", type)) SendClientMessage(playerid, COLOR_GREY, "USAGE: /accept {FFFFFF}[death,shake1-6,repair,refill,taxi,mech,drag,blind]");
- else
- {
- if (GetPVarInt(playerid, "PlayerLogged") == 0) return SendClientMessage(playerid, COLOR_WHITE, "You must be logged in to use this.");
- if(GetPVarInt(playerid, "Mute") == 1) return SendClientMessage(playerid, COLOR_LIGHTRED, "You are currently muted !");
- if(strcmp(type, "death", true) == 0)
- {
- if (GetPVarInt(playerid, "Dead") != 2) return SendClientMessage(playerid, COLOR_WHITE, "You have not even died yet.");
- if(GetPVarInt(playerid, "DeathTime") > GetCount()) return SendClientMessage(playerid, COLOR_WHITE, "You must wait before accepting death.");
- if(GetPVarInt(playerid, "JailTime") >= 1) return SendClientMessage(playerid, COLOR_WHITE, "You cannot accept death inside the prison, you must wait for a gaurd or prisoner to RP with you!");
- format(sendername, sizeof(sendername), "%s", PlayerNameEx(playerid));
- GiveNameSpace(sendername);
- format(string, sizeof(string), "%s has accepted death.",sendername);
- ProxDetector(20.0, playerid, string, COLOR_WHITE);
- DeletePVar(playerid,"DeathTime");
- SetPVarInt(playerid, "Drag", 501);
- SetPVarInt(playerid, "Cuffed", 0);
- SetPVarInt(playerid, "CuffedTime", 0);
- SetPVarInt(playerid, "InvWeapon", 0); SetPVarInt(playerid, "InvAmmo", 0);
- SetPVarInt(playerid, "DuffleBag", 0);
- ResetPlayerWeaponsEx(playerid);
- SetPVarInt(playerid, "FadeToDeath", 1);
- FadeTime[playerid]=0;
- FadeScreen(playerid, 1);
- ClearChatbox(playerid,50);
- DeletePVar(playerid,"Blinded"), TextDrawHideForPlayer(playerid,BlindDraw);
- }
- else if(strcmp(type, "trunk", true) == 0)
- {
- if(GetPVarInt(playerid, "TrunkOffer") != 501)
- {
- if(IsPlayerConnected(GetPVarInt(playerid, "TrunkOffer")))
- {
- if(PlayerToPlayer(playerid,GetPVarInt(playerid, "TrunkOffer"),5.0))
- {
- format(sendername, sizeof(sendername), "%s", PlayerNameEx(playerid));
- format(giveplayer, sizeof(giveplayer), "%s", PlayerNameEx(GetPVarInt(playerid, "TrunkOffer")));
- GiveNameSpace(sendername);
- GiveNameSpace(giveplayer);
- format(string, sizeof(string), "You accepted %s's offer.", giveplayer);
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "%s has accepted your offer.", sendername);
- SendClientMessage(GetPVarInt(playerid, "TrunkOffer"), COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), "*** %s places %s inside the trunk.", giveplayer, sendername);
- ProxDetector(30.0, GetPVarInt(playerid, "TrunkOffer"), string, COLOR_PURPLE);
- SendClientMessage(playerid,COLOR_WHITE,"You are inside the trunk, type (/exittrunk) if the trunk is open.");
- SendClientMessage(playerid,COLOR_LIGHTRED,"WARNING: If your stuck spectating reconnect from the server.");
- TogglePlayerSpectatingEx(playerid, 1);
- PlayerSpectateVehicle(playerid, GetPVarInt(playerid, "TrunkOfferID"));
- SetPVarInt(playerid,"InTrunk", GetPVarInt(playerid, "TrunkOfferID"));
- SetPVarInt(playerid, "TrunkOffer", 501);
- DeletePVar(playerid,"TrunkOfferID");
- }
- else SendClientMessage(playerid, COLOR_GREY, "You must be around the person who offered the trunk put-in."), SetPVarInt(playerid, "TrunkOffer", 501);
- }
- else SendClientMessage(playerid, COLOR_GREY, "The person who offered a trunk put-in is offline."), SetPVarInt(playerid, "TrunkOffer", 501);
- }
- else SendClientMessage(playerid, COLOR_GREY, "You havent been offered for a trunk put-in.");
- }
- else if(strcmp(type, "drag", true) == 0)
- {
- if(GetPVarInt(playerid, "DragOffer") != 501)
- {
- if(IsPlayerConnected(GetPVarInt(playerid, "DragOffer")))
- {
- if(PlayerToPlayer(playerid,GetPVarInt(playerid, "DragOffer"),5.0) && GetPVarInt(playerid, "Dead") != 0)
- {
- format(sendername, sizeof(sendername), "%s", PlayerNameEx(playerid));
- format(giveplayer, sizeof(giveplayer), "%s", PlayerNameEx(GetPVarInt(playerid, "DragOffer")));
- GiveNameSpace(sendername);
- GiveNameSpace(giveplayer);
- format(string, sizeof(string), "You accepted %s's drag offer.", giveplayer);
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "%s has accepted your drag offer.", sendername);
- SendClientMessage(GetPVarInt(playerid, "DragOffer"), COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), "*** %s starts to drag %s.", giveplayer, sendername);
- ProxDetector(30.0, GetPVarInt(playerid, "DragOffer"), string, COLOR_PURPLE);
- TogglePlayerControllableEx(playerid,false);
- SetPVarInt(playerid, "Drag", GetPVarInt(playerid, "DragOffer"));
- SetPVarInt(playerid, "DragOffer", 501);
- }
- else SendClientMessage(playerid, COLOR_GREY, "You must be around the person who offered the drag."), SetPVarInt(playerid, "DragOffer", 501);
- }
- else SendClientMessage(playerid, COLOR_GREY, "The person who offered a drag is offline."), SetPVarInt(playerid, "DragOffer", 501);
- }
- else SendClientMessage(playerid, COLOR_GREY, "You havent been offered for a drag.");
- }
- else if(strcmp(type, "shake1", true) == 0)
- {
- if(GetPVarInt(playerid, "ShakeOffer") != 501)
- {
- if(IsPlayerConnected(GetPVarInt(playerid, "ShakeOffer")))
- {
- if(PlayerToPlayer(playerid,GetPVarInt(playerid, "ShakeOffer"),8.0))
- {
- SetPlayerToFacePlayer(playerid, GetPVarInt(playerid, "ShakeOffer"));
- format(sendername, sizeof(sendername), "%s", PlayerNameEx(playerid));
- format(giveplayer, sizeof(giveplayer), "%s", PlayerNameEx(GetPVarInt(playerid, "ShakeOffer")));
- GiveNameSpace(sendername);
- GiveNameSpace(giveplayer);
- format(string, sizeof(string), "You accepted %s's handshake.", giveplayer);
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "%s has accepted your handshake.", sendername);
- SendClientMessage(GetPVarInt(playerid, "ShakeOffer"), COLOR_LIGHTBLUE, string);
- ApplyAnimation(playerid,"GANGS","hndshkaa",4.0,0,0,0,0,0);
- ApplyAnimation(GetPVarInt(playerid, "ShakeOffer"),"GANGS","hndshkaa",4.0,0,0,0,0,0);
- SetPVarInt(playerid, "ShakeOffer", 501);
- }
- else SendClientMessage(playerid, COLOR_GREY, "You must be around the person who offered the shake.");
- }
- else SendClientMessage(playerid, COLOR_GREY, "The person who offered a shake is offline."), SetPVarInt(playerid, "ShakeOffer", 501);
- }
- else SendClientMessage(playerid, COLOR_GREY, "You havent been offered for a shake.");
- }
- else if(strcmp(type, "shake2", true) == 0)
- {
- if(GetPVarInt(playerid, "ShakeOffer") != 501)
- {
- if(IsPlayerConnected(GetPVarInt(playerid, "ShakeOffer")))
- {
- if(PlayerToPlayer(playerid,GetPVarInt(playerid, "ShakeOffer"),8.0))
- {
- SetPlayerToFacePlayer(playerid, GetPVarInt(playerid, "ShakeOffer"));
- format(sendername, sizeof(sendername), "%s", PlayerNameEx(playerid));
- format(giveplayer, sizeof(giveplayer), "%s", PlayerNameEx(GetPVarInt(playerid, "ShakeOffer")));
- GiveNameSpace(sendername);
- GiveNameSpace(giveplayer);
- format(string, sizeof(string), "You accepted %s's handshake.", giveplayer);
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "%s has accepted your handshake.", sendername);
- SendClientMessage(GetPVarInt(playerid, "ShakeOffer"), COLOR_LIGHTBLUE, string);
- ApplyAnimation(playerid,"GANGS","hndshkba",4.0,0,0,0,0,0);
- ApplyAnimation(GetPVarInt(playerid, "ShakeOffer"),"GANGS","hndshkba",4.0,0,0,0,0,0);
- SetPVarInt(playerid, "ShakeOffer", 501);
- }
- else SendClientMessage(playerid, COLOR_GREY, "You must be around the person who offered the shake.");
- }
- else SendClientMessage(playerid, COLOR_GREY, "The person who offered a shake is offline."), SetPVarInt(playerid, "ShakeOffer", 501);
- }
- else SendClientMessage(playerid, COLOR_GREY, "You havent been offered for a shake.");
- }
- else if(strcmp(type, "shake3", true) == 0)
- {
- if(GetPVarInt(playerid, "ShakeOffer") != 501)
- {
- if(IsPlayerConnected(GetPVarInt(playerid, "ShakeOffer")))
- {
- if(PlayerToPlayer(playerid,GetPVarInt(playerid, "ShakeOffer"),8.0))
- {
- SetPlayerToFacePlayer(playerid, GetPVarInt(playerid, "ShakeOffer"));
- format(sendername, sizeof(sendername), "%s", PlayerNameEx(playerid));
- format(giveplayer, sizeof(giveplayer), "%s", PlayerNameEx(GetPVarInt(playerid, "ShakeOffer")));
- GiveNameSpace(sendername);
- GiveNameSpace(giveplayer);
- format(string, sizeof(string), "You accepted %s's handshake.", giveplayer);
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "%s has accepted your handshake.", sendername);
- SendClientMessage(GetPVarInt(playerid, "ShakeOffer"), COLOR_LIGHTBLUE, string);
- ApplyAnimation(playerid,"GANGS","hndshkca",4.0,0,0,0,0,0);
- ApplyAnimation(GetPVarInt(playerid, "ShakeOffer"),"GANGS","hndshkca",4.0,0,0,0,0,0);
- SetPVarInt(playerid, "ShakeOffer", 501);
- }
- else SendClientMessage(playerid, COLOR_GREY, "You must be around the person who offered the shake.");
- }
- else SendClientMessage(playerid, COLOR_GREY, "The person who offered a shake is offline."), SetPVarInt(playerid, "ShakeOffer", 501);
- }
- else SendClientMessage(playerid, COLOR_GREY, "You havent been offered for a shake.");
- }
- else if(strcmp(type, "shake4", true) == 0)
- {
- if(GetPVarInt(playerid, "ShakeOffer") != 501)
- {
- if(IsPlayerConnected(GetPVarInt(playerid, "ShakeOffer")))
- {
- if(PlayerToPlayer(playerid,GetPVarInt(playerid, "ShakeOffer"),8.0))
- {
- SetPlayerToFacePlayer(playerid, GetPVarInt(playerid, "ShakeOffer"));
- format(sendername, sizeof(sendername), "%s", PlayerNameEx(playerid));
- format(giveplayer, sizeof(giveplayer), "%s", PlayerNameEx(GetPVarInt(playerid, "ShakeOffer")));
- GiveNameSpace(sendername);
- GiveNameSpace(giveplayer);
- format(string, sizeof(string), "You accepted %s's handshake.", giveplayer);
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "%s has accepted your handshake.", sendername);
- SendClientMessage(GetPVarInt(playerid, "ShakeOffer"), COLOR_LIGHTBLUE, string);
- ApplyAnimation(playerid,"GANGS","hndshkcb",4.0,0,0,0,0,0);
- ApplyAnimation(GetPVarInt(playerid, "ShakeOffer"),"GANGS","hndshkcb",4.0,0,0,0,0,0);
- SetPVarInt(playerid, "ShakeOffer", 501);
- }
- else SendClientMessage(playerid, COLOR_GREY, "You must be around the person who offered the shake.");
- }
- else SendClientMessage(playerid, COLOR_GREY, "The person who offered a shake is offline."), SetPVarInt(playerid, "ShakeOffer", 501);
- }
- else SendClientMessage(playerid, COLOR_GREY, "You havent been offered for a shake.");
- }
- else if(strcmp(type, "shake5", true) == 0)
- {
- if(GetPVarInt(playerid, "ShakeOffer") != 501)
- {
- if(IsPlayerConnected(GetPVarInt(playerid, "ShakeOffer")))
- {
- if(PlayerToPlayer(playerid,GetPVarInt(playerid, "ShakeOffer"),8.0))
- {
- SetPlayerToFacePlayer(playerid, GetPVarInt(playerid, "ShakeOffer"));
- format(sendername, sizeof(sendername), "%s", PlayerNameEx(playerid));
- format(giveplayer, sizeof(giveplayer), "%s", PlayerNameEx(GetPVarInt(playerid, "ShakeOffer")));
- GiveNameSpace(sendername);
- GiveNameSpace(giveplayer);
- format(string, sizeof(string), "You accepted %s's handshake.", giveplayer);
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "%s has accepted your handshake.", sendername);
- SendClientMessage(GetPVarInt(playerid, "ShakeOffer"), COLOR_LIGHTBLUE, string);
- ApplyAnimation(playerid,"GANGS","hndshkda",4.0,0,0,0,0,0);
- ApplyAnimation(GetPVarInt(playerid, "ShakeOffer"),"GANGS","hndshkda",4.0,0,0,0,0,0);
- SetPVarInt(playerid, "ShakeOffer", 501);
- }
- else SendClientMessage(playerid, COLOR_GREY, "You must be around the person who offered the shake.");
- }
- else SendClientMessage(playerid, COLOR_GREY, "The person who offered a shake is offline."), SetPVarInt(playerid, "ShakeOffer", 501);
- }
- else SendClientMessage(playerid, COLOR_GREY, "You havent been offered for a shake.");
- }
- else if(strcmp(type, "shake6", true) == 0)
- {
- if(GetPVarInt(playerid, "ShakeOffer") != 501)
- {
- if(IsPlayerConnected(GetPVarInt(playerid, "ShakeOffer")))
- {
- if(PlayerToPlayer(playerid,GetPVarInt(playerid, "ShakeOffer"),8.0))
- {
- SetPlayerToFacePlayer(playerid, GetPVarInt(playerid, "ShakeOffer"));
- format(sendername, sizeof(sendername), "%s", PlayerNameEx(playerid));
- format(giveplayer, sizeof(giveplayer), "%s", PlayerNameEx(GetPVarInt(playerid, "ShakeOffer")));
- GiveNameSpace(sendername);
- GiveNameSpace(giveplayer);
- format(string, sizeof(string), "You accepted %s's handshake.", giveplayer);
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "%s has accepted your handshake.", sendername);
- SendClientMessage(GetPVarInt(playerid, "ShakeOffer"), COLOR_LIGHTBLUE, string);
- ApplyAnimation(playerid,"GANGS","hndshkea",4.0,0,0,0,0,0);
- ApplyAnimation(GetPVarInt(playerid, "ShakeOffer"),"GANGS","hndshkea",4.0,0,0,0,0,0);
- SetPVarInt(playerid, "ShakeOffer", 501);
- }
- else SendClientMessage(playerid, COLOR_GREY, "You must be around the person who offered the shake.");
- }
- else SendClientMessage(playerid, COLOR_GREY, "The person who offered a shake is offline."), SetPVarInt(playerid, "ShakeOffer", 501);
- }
- else SendClientMessage(playerid, COLOR_GREY, "You havent been offered for a shake.");
- }
- else if(strcmp(type, "shake7", true) == 0)
- {
- if(GetPVarInt(playerid, "ShakeOffer") != 501)
- {
- if(IsPlayerConnected(GetPVarInt(playerid, "ShakeOffer")))
- {
- if(PlayerToPlayer(playerid,GetPVarInt(playerid, "ShakeOffer"),8.0))
- {
- SetPlayerToFacePlayer(playerid, GetPVarInt(playerid, "ShakeOffer"));
- format(sendername, sizeof(sendername), "%s", PlayerNameEx(playerid));
- format(giveplayer, sizeof(giveplayer), "%s", PlayerNameEx(GetPVarInt(playerid, "ShakeOffer")));
- GiveNameSpace(sendername);
- GiveNameSpace(giveplayer);
- format(string, sizeof(string), "You accepted %s's handshake.", giveplayer);
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "%s has accepted your handshake.", sendername);
- SendClientMessage(GetPVarInt(playerid, "ShakeOffer"), COLOR_LIGHTBLUE, string);
- ApplyAnimation(playerid,"GANGS","hndshkfa",4.0,0,0,0,0,0);
- ApplyAnimation(GetPVarInt(playerid, "ShakeOffer"),"GANGS","hndshkfa",4.0,0,0,0,0,0);
- SetPVarInt(playerid, "ShakeOffer", 501);
- }
- else SendClientMessage(playerid, COLOR_GREY, "You must be around the person who offered the shake.");
- }
- else SendClientMessage(playerid, COLOR_GREY, "The person who offered a shake is offline."), SetPVarInt(playerid, "ShakeOffer", 501);
- }
- else SendClientMessage(playerid, COLOR_GREY, "You havent been offered for a shake.");
- }
- else if(strcmp(type, "shake8", true) == 0)
- {
- if(GetPVarInt(playerid, "ShakeOffer") != 501)
- {
- if(IsPlayerConnected(GetPVarInt(playerid, "ShakeOffer")))
- {
- if(PlayerToPlayer(playerid,GetPVarInt(playerid, "ShakeOffer"),8.0))
- {
- SetPlayerToFacePlayer(playerid, GetPVarInt(playerid, "ShakeOffer"));
- format(sendername, sizeof(sendername), "%s", PlayerNameEx(playerid));
- format(giveplayer, sizeof(giveplayer), "%s", PlayerNameEx(GetPVarInt(playerid, "ShakeOffer")));
- GiveNameSpace(sendername);
- GiveNameSpace(giveplayer);
- format(string, sizeof(string), "You accepted %s's handshake.", giveplayer);
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "%s has accepted your handshake.", sendername);
- SendClientMessage(GetPVarInt(playerid, "ShakeOffer"), COLOR_LIGHTBLUE, string);
- ApplyAnimation(playerid,"GANGS","prtial_hndshk_biz_01",4.0,0,0,0,0,0);
- ApplyAnimation(GetPVarInt(playerid, "ShakeOffer"),"GANGS","prtial_hndshk_biz_01",4.0,0,0,0,0,0);
- SetPVarInt(playerid, "ShakeOffer", 501);
- }
- else SendClientMessage(playerid, COLOR_GREY, "You must be around the person who offered the shake.");
- }
- else SendClientMessage(playerid, COLOR_GREY, "The person who offered a shake is offline."), SetPVarInt(playerid, "ShakeOffer", 501);
- }
- else SendClientMessage(playerid, COLOR_GREY, "You havent been offered for a shake.");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement