public OnPlayerCommandText(playerid, cmdtext[]) { new tmp[256]; new cmd[256]; new idx; cmd = strtok(cmdtext, idx); new giveplayer[MAX_PLAYER_NAME]; new sendername[MAX_PLAYER_NAME]; new number[256]; if(strcmp(cmd,"/shake",true)==0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /shake [playerid/PartOfName]"); return 1; } new giveplayerid; giveplayerid = strval(tmp); if (IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if (ProxDetectorS(8.0, playerid, giveplayerid)) { if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, " You can't handshake yourself"); return 1; } new string[256]; GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* You offered %s a handshake .", giveplayer); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* %s is offering you a handshake, (type /accept shake[1-7]).", sendername); SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string); ShakeOffer[giveplayerid] = playerid; } else { SendClientMessage(playerid, COLOR_GREY, " That player is not near you!"); } } } else { SendClientMessage(playerid, COLOR_GREY, " Invalid ID/Name!"); return 1; } } return 1; } if(strcmp(cmd,"/accept",true)==0) { number = strtok(cmdtext, idx); if(!strlen(number)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /accept [name]"); SendClientMessage(playerid, COLOR_GREY, "Available names: Shake(1-7)"); return 1; } if(strcmp(number,"shake",true) == 0) { if(ShakeOffer[playerid] < TOUR_SHAKE) { if(IsPlayerConnected(ShakeOffer[playerid])) { new string[256]; GetPlayerName(ShakeOffer[playerid], giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* You have accepted the handshake."); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* %s has accepted your handshake offer.",sendername); ApplyAnimation(playerid,"GANGS","hndshkfa_swt",4.0,0,0,0,0,0); ApplyAnimation(ShakeOffer[playerid],"GANGS","hndshkfa_swt",4.0,0,0,0,0,0); SendClientMessage(ShakeOffer[playerid], COLOR_LIGHTBLUE, string); ShakeOffer[playerid] = TOUR_SHAKE; return 1; } else { SendClientMessage(playerid, COLOR_GREY, " No-one has offered a handshake..."); return 1; } } } else if(strcmp(number,"shake1",true) == 0) { if(ShakeOffer[playerid] < TOUR_SHAKE) { if(IsPlayerConnected(ShakeOffer[playerid])) { new string[256]; GetPlayerName(ShakeOffer[playerid], giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* You have accepted the handshake."); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* %s has accepted your handshake offer.",sendername); ApplyAnimation(playerid,"GANGS","hndshkaa",4.0,0,0,0,0,0); ApplyAnimation(ShakeOffer[playerid],"GANGS","hndshkaa",4.0,0,0,0,0,0); SendClientMessage(ShakeOffer[playerid], COLOR_LIGHTBLUE, string); ShakeOffer[playerid] = TOUR_SHAKE; return 1; } else { SendClientMessage(playerid, COLOR_GREY, " No-one has offered a handshake..."); return 1; } } } else if(strcmp(number,"shake2",true) == 0) { if(ShakeOffer[playerid] < TOUR_SHAKE) { if(IsPlayerConnected(ShakeOffer[playerid])) { new string[256]; GetPlayerName(ShakeOffer[playerid], giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* You have accepted the handshake."); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* %s has accepted your handshake offer.",sendername); ApplyAnimation(playerid,"GANGS","hndshkba",4.0,0,0,0,0,0); ApplyAnimation(ShakeOffer[playerid],"GANGS","hndshkba",4.0,0,0,0,0,0); SendClientMessage(ShakeOffer[playerid], COLOR_LIGHTBLUE, string); ShakeOffer[playerid] = TOUR_SHAKE; return 1; } else { SendClientMessage(playerid, COLOR_GREY, " No-one has offered a handshake..."); return 1; } } } else if(strcmp(number,"shake3",true) == 0) { if(ShakeOffer[playerid] < TOUR_SHAKE) { if(IsPlayerConnected(ShakeOffer[playerid])) { new string[256]; GetPlayerName(ShakeOffer[playerid], giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* You have accepted the handshake."); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* %s has accepted your handshake offer.",sendername); ApplyAnimation(playerid,"GANGS","hndshkca",4.0,0,0,0,0,0); ApplyAnimation(ShakeOffer[playerid],"GANGS","hndshkca",4.0,0,0,0,0,0); SendClientMessage(ShakeOffer[playerid], COLOR_LIGHTBLUE, string); ShakeOffer[playerid] = TOUR_SHAKE; return 1; } else { SendClientMessage(playerid, COLOR_GREY, " No-one has offered a handshake..."); return 1; } } } else if(strcmp(number,"shake4",true) == 0) { if(ShakeOffer[playerid] < TOUR_SHAKE) { if(IsPlayerConnected(ShakeOffer[playerid])) { new string[256]; GetPlayerName(ShakeOffer[playerid], giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* You have accepted the handshake."); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* %s has accepted your handshake offer.",sendername); ApplyAnimation(playerid,"GANGS","hndshkcb",4.0,0,0,0,0,0); ApplyAnimation(ShakeOffer[playerid],"GANGS","hndshkcb",4.0,0,0,0,0,0); SendClientMessage(ShakeOffer[playerid], COLOR_LIGHTBLUE, string); ShakeOffer[playerid] = TOUR_SHAKE; return 1; } else { SendClientMessage(playerid, COLOR_GREY, " No-one has offered a handshake..."); return 1; } } } else if(strcmp(number,"shake5",true) == 0) { if(ShakeOffer[playerid] < TOUR_SHAKE) { if(IsPlayerConnected(ShakeOffer[playerid])) { new string[256]; GetPlayerName(ShakeOffer[playerid], giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* You have accepted the handshake."); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* %s has accepted your handshake offer.",sendername); ApplyAnimation(playerid,"GANGS","hndshkda",4.0,0,0,0,0,0); ApplyAnimation(ShakeOffer[playerid],"GANGS","hndshkda",4.0,0,0,0,0,0); SendClientMessage(ShakeOffer[playerid], COLOR_LIGHTBLUE, string); ShakeOffer[playerid] = TOUR_SHAKE; return 1; } else { SendClientMessage(playerid, COLOR_GREY, " No-one has offered a handshake..."); return 1; } } } else if(strcmp(number,"shake6",true) == 0) { if(ShakeOffer[playerid] < TOUR_SHAKE) { if(IsPlayerConnected(ShakeOffer[playerid])) { new string[256]; GetPlayerName(ShakeOffer[playerid], giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* You have accepted the handshake."); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* %s has accepted your handshake offer.",sendername); ApplyAnimation(playerid,"GANGS","hndshkea",4.0,0,0,0,0,0); ApplyAnimation(ShakeOffer[playerid],"GANGS","hndshkea",4.0,0,0,0,0,0); SendClientMessage(ShakeOffer[playerid], COLOR_LIGHTBLUE, string); ShakeOffer[playerid] = TOUR_SHAKE; return 1; } else { SendClientMessage(playerid, COLOR_GREY, " No-one has offered a handshake..."); return 1; } } } else if(strcmp(number,"shake7",true) == 0) { if(ShakeOffer[playerid] < TOUR_SHAKE) { if(IsPlayerConnected(ShakeOffer[playerid])) { new string[256]; GetPlayerName(ShakeOffer[playerid], giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* You have accepted the handshake."); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* %s has accepted your handshake offer.",sendername); ApplyAnimation(playerid,"GANGS","hndshkfa",4.0,0,0,0,0,0); ApplyAnimation(ShakeOffer[playerid],"GANGS","hndshkfa",4.0,0,0,0,0,0); SendClientMessage(ShakeOffer[playerid], COLOR_LIGHTBLUE, string); ShakeOffer[playerid] = TOUR_SHAKE; return 1; } else { SendClientMessage(playerid, COLOR_GREY, " No-one has offered a handshake..."); return 1; } } } } return 0; }
Hi, I need your help, I have command /shake and /shake accept (1-7) need to redo commands ZCMD, and I'm confused, not helped by someone to do it? Thank you in advance.
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { new tmp[256]; new cmd[256]; new idx; cmd = strtok(cmdtext, idx); new giveplayer[MAX_PLAYER_NAME]; new sendername[MAX_PLAYER_NAME]; new number[256]; if(strcmp(cmd,"/shake",true)==0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /shake [playerid/PartOfName]"); return 1; } new giveplayerid; giveplayerid = strval(tmp); if (IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if (ProxDetectorS(8.0, playerid, giveplayerid)) { if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, " You can't handshake yourself"); return 1; } new string[256]; GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* You offered %s a handshake .", giveplayer); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* %s is offering you a handshake, (type /accept shake[1-7]).", sendername); SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string); ShakeOffer[giveplayerid] = playerid; } else { SendClientMessage(playerid, COLOR_GREY, " That player is not near you!"); } } } else { SendClientMessage(playerid, COLOR_GREY, " Invalid ID/Name!"); return 1; } } return 1; } if(strcmp(cmd,"/accept",true)==0) { number = strtok(cmdtext, idx); if(!strlen(number)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /accept [name]"); SendClientMessage(playerid, COLOR_GREY, "Available names: Shake(1-7)"); return 1; } if(strcmp(number,"shake",true) == 0) { if(ShakeOffer[playerid] < TOUR_SHAKE) { if(IsPlayerConnected(ShakeOffer[playerid])) { new string[256]; GetPlayerName(ShakeOffer[playerid], giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* You have accepted the handshake."); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* %s has accepted your handshake offer.",sendername); ApplyAnimation(playerid,"GANGS","hndshkfa_swt",4.0,0,0,0,0,0); ApplyAnimation(ShakeOffer[playerid],"GANGS","hndshkfa_swt",4.0,0,0,0,0,0); SendClientMessage(ShakeOffer[playerid], COLOR_LIGHTBLUE, string); ShakeOffer[playerid] = TOUR_SHAKE; return 1; } else { SendClientMessage(playerid, COLOR_GREY, " No-one has offered a handshake..."); return 1; } } } else if(strcmp(number,"shake1",true) == 0) { if(ShakeOffer[playerid] < TOUR_SHAKE) { if(IsPlayerConnected(ShakeOffer[playerid])) { new string[256]; GetPlayerName(ShakeOffer[playerid], giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* You have accepted the handshake."); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* %s has accepted your handshake offer.",sendername); ApplyAnimation(playerid,"GANGS","hndshkaa",4.0,0,0,0,0,0); ApplyAnimation(ShakeOffer[playerid],"GANGS","hndshkaa",4.0,0,0,0,0,0); SendClientMessage(ShakeOffer[playerid], COLOR_LIGHTBLUE, string); ShakeOffer[playerid] = TOUR_SHAKE; return 1; } else { SendClientMessage(playerid, COLOR_GREY, " No-one has offered a handshake..."); return 1; } } } else if(strcmp(number,"shake2",true) == 0) { if(ShakeOffer[playerid] < TOUR_SHAKE) { if(IsPlayerConnected(ShakeOffer[playerid])) { new string[256]; GetPlayerName(ShakeOffer[playerid], giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* You have accepted the handshake."); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* %s has accepted your handshake offer.",sendername); ApplyAnimation(playerid,"GANGS","hndshkba",4.0,0,0,0,0,0); ApplyAnimation(ShakeOffer[playerid],"GANGS","hndshkba",4.0,0,0,0,0,0); SendClientMessage(ShakeOffer[playerid], COLOR_LIGHTBLUE, string); ShakeOffer[playerid] = TOUR_SHAKE; return 1; } else { SendClientMessage(playerid, COLOR_GREY, " No-one has offered a handshake..."); return 1; } } } else if(strcmp(number,"shake3",true) == 0) { if(ShakeOffer[playerid] < TOUR_SHAKE) { if(IsPlayerConnected(ShakeOffer[playerid])) { new string[256]; GetPlayerName(ShakeOffer[playerid], giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* You have accepted the handshake."); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* %s has accepted your handshake offer.",sendername); ApplyAnimation(playerid,"GANGS","hndshkca",4.0,0,0,0,0,0); ApplyAnimation(ShakeOffer[playerid],"GANGS","hndshkca",4.0,0,0,0,0,0); SendClientMessage(ShakeOffer[playerid], COLOR_LIGHTBLUE, string); ShakeOffer[playerid] = TOUR_SHAKE; return 1; } else { SendClientMessage(playerid, COLOR_GREY, " No-one has offered a handshake..."); return 1; } } } else if(strcmp(number,"shake4",true) == 0) { if(ShakeOffer[playerid] < TOUR_SHAKE) { if(IsPlayerConnected(ShakeOffer[playerid])) { new string[256]; GetPlayerName(ShakeOffer[playerid], giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* You have accepted the handshake."); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* %s has accepted your handshake offer.",sendername); ApplyAnimation(playerid,"GANGS","hndshkcb",4.0,0,0,0,0,0); ApplyAnimation(ShakeOffer[playerid],"GANGS","hndshkcb",4.0,0,0,0,0,0); SendClientMessage(ShakeOffer[playerid], COLOR_LIGHTBLUE, string); ShakeOffer[playerid] = TOUR_SHAKE; return 1; } else { SendClientMessage(playerid, COLOR_GREY, " No-one has offered a handshake..."); return 1; } } } else if(strcmp(number,"shake5",true) == 0) { if(ShakeOffer[playerid] < TOUR_SHAKE) { if(IsPlayerConnected(ShakeOffer[playerid])) { new string[256]; GetPlayerName(ShakeOffer[playerid], giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* You have accepted the handshake."); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* %s has accepted your handshake offer.",sendername); ApplyAnimation(playerid,"GANGS","hndshkda",4.0,0,0,0,0,0); ApplyAnimation(ShakeOffer[playerid],"GANGS","hndshkda",4.0,0,0,0,0,0); SendClientMessage(ShakeOffer[playerid], COLOR_LIGHTBLUE, string); ShakeOffer[playerid] = TOUR_SHAKE; return 1; } else { SendClientMessage(playerid, COLOR_GREY, " No-one has offered a handshake..."); return 1; } } } else if(strcmp(number,"shake6",true) == 0) { if(ShakeOffer[playerid] < TOUR_SHAKE) { if(IsPlayerConnected(ShakeOffer[playerid])) { new string[256]; GetPlayerName(ShakeOffer[playerid], giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* You have accepted the handshake."); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* %s has accepted your handshake offer.",sendername); ApplyAnimation(playerid,"GANGS","hndshkea",4.0,0,0,0,0,0); ApplyAnimation(ShakeOffer[playerid],"GANGS","hndshkea",4.0,0,0,0,0,0); SendClientMessage(ShakeOffer[playerid], COLOR_LIGHTBLUE, string); ShakeOffer[playerid] = TOUR_SHAKE; return 1; } else { SendClientMessage(playerid, COLOR_GREY, " No-one has offered a handshake..."); return 1; } } } else if(strcmp(number,"shake7",true) == 0) { if(ShakeOffer[playerid] < TOUR_SHAKE) { if(IsPlayerConnected(ShakeOffer[playerid])) { new string[256]; GetPlayerName(ShakeOffer[playerid], giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* You have accepted the handshake."); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* %s has accepted your handshake offer.",sendername); ApplyAnimation(playerid,"GANGS","hndshkfa",4.0,0,0,0,0,0); ApplyAnimation(ShakeOffer[playerid],"GANGS","hndshkfa",4.0,0,0,0,0,0); SendClientMessage(ShakeOffer[playerid], COLOR_LIGHTBLUE, string); ShakeOffer[playerid] = TOUR_SHAKE; return 1; } else { SendClientMessage(playerid, COLOR_GREY, " No-one has offered a handshake..."); return 1; } } } } return 0; } |
COMMAND:shake(playerid, params[])
{
new targetid,string[128],sendername[MAX_PLAYER_NAME],giveplayer[MAX_PLAYER_NAME];
if(sscanf(params, "ui", targetid)) SendClientMessage(playerid, COLOR_GREY, "USAGE: /shake [playerid]");
else
{
if (playerid == targetid) return SendClientMessage(playerid, COLOR_GREY, "You cannot pay to yourself.");
if(IsPlayerConnected(targetid))
{
if(PlayerToPlayer(playerid,targetid,8.0))
{
format(sendername, sizeof(sendername), "%s", PlayerNameEx(playerid));
format(giveplayer, sizeof(giveplayer), "%s", PlayerNameEx(targetid));
GiveNameSpace(sendername);
GiveNameSpace(giveplayer);
format(string, sizeof(string), "You offered %s a handshake.", giveplayer);
SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
format(string, sizeof(string), "%s gave you a handshake (/accept shake1-8).", sendername);
SendClientMessage(targetid,COLOR_LIGHTBLUE,string);
}
else
{
SendClientMessage(playerid,COLOR_GREY,"You are not close enough to that player !");
}
}
}
return 1;
}
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}[shake1-6]");
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)
{
format(sendername, sizeof(sendername), "%s", PlayerNameEx(playerid));
format(string, sizeof(string), "%s has accepted death.",sendername);
ProxDetector(20.0, playerid, string, COLOR_WHITE);
}
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.");
}
}
return 1;
}