14.02.2014, 11:02
I need these cmds ive tried making but failed (dcmd only) alog dcmd aswell
+3REP
+3REP
new pCuffed[MAX_PLAYERS];
CMD:cuff(playerid, params[])
{
new tid, string[64], name[MAX_PLAYER_NAME];
if(sscanf(params, "u", tid)) return SendClientMessage(playerid, -1, "/cuff [ID]");
if(!IsPlayerConnected(tid)) return SendClientMessage(playerid, -1, "The ID you entered isn't connected to the server.");
if(pCuffed[tid] == 0)
{
pCuffed[tid] = 1; // set var
format(string, sizeof(string), "You have cuffed %s.", GetPlayerName(tid, name, sizeof(name)) );
SendClientMessage(playerid, -1, string);
SetPlayerSpecialAction(tid, SPECIAL_ACTION_CUFFED);
SetPlayerAttachedObject(tid, 7, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977, -81.700035, 0.891999, 1.000000, 1.168000);
}
else SendClientMessage(playerid, -1, "Player is already cuffed!");
return 1;
}
CMD:breakcuffs(playerid, params[])
{
new tid, string[64], name[MAX_PLAYER_NAME];
if(sscanf(params, "u", tid)) return SendClientMessage(playerid, -1, "/uncuff [ID]");
if(!IsPlayerConnected(tid)) return SendClientMessage(playerid, -1, "The ID you entered isn't connected to the server.");
if(pCuffed[tid] == 1)
{
pCuffed[tid] = 0; // set var
format(string, sizeof(string), "You have broken %s's cuffs.", GetPlayerName(tid, name, sizeof(name)) );
SendClientMessage(playerid, -1, string);
RemovePlayerAttachedObject(playerid, 7); // remove their attached object
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
}
else SendClientMessage(playerid, -1, "Player isn't cuffed!");
return 1;
}
CMD:breakcuffs(playerid, params[])
{
new string[64];
if(pCuffed[tid] == 1)
{
pCuffed[tid] = 0; // set var
SendClientMessage(playerid, -1, "You have broken your cuffs.");
RemovePlayerAttachedObject(playerid, 7); // remove their attached object
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
}
else SendClientMessage(playerid, -1, "You aren't cuffed!");
return 1;
}