cmd_kill(playerid);
CMD:kill(playerid) { SetPlayerHealth(playerid, 0); return 1; }
new targetplayer = GetPlayerTargetPlayer(playerid); cmd_cuff(playerid, targetplayer);
CMD:cuff(playerid, params[]) { if(org[playerid] == 5) return SendClientMessage(playerid, COLOR_RED, "MEDICs can not use this command."); if(morto[playerid] == true) return SendClientMessage(playerid, COLOR_RED, "You can not use this command killed."); if(!IsACop(playerid)) return SendClientMessage(playerid, -1, "You aren't a COP"); new id; if(sscanf(params,"u", id)) return SendClientMessage(playerid, -1, "Use: /cuff [id]"); if(id != INVALID_PLAYER_ID) { if(GetPlayerSpecialAction(id) != SPECIAL_ACTION_HANDSUP && morto[id] != true) return SendClientMessage(playerid, COLOR_GRAD2, "The player need be handsup,imo or dead!"); if(PlayerCuffed[id] > 0) return SendClientMessage(playerid, COLOR_GREY, "This player is already cuffed!"); if (ProxDetectorS(8.0, playerid, id)) { Cuffing(playerid, id); } } return 1; }
error 035: argument type mismatch (argument 2)
error 035: argument type mismatch (argument 2)
new targetplayer = GetPlayerTargetPlayer(playerid); cmd_cuff(playerid, targetplayer);
CMD:cuff(playerid, params[]) { if(org[playerid] == 5) return SendClientMessage(playerid, COLOR_RED, "MEDICs can not use this command."); if(morto[playerid] == true) return SendClientMessage(playerid, COLOR_RED, "You can not use this command killed."); if(!IsACop(playerid)) return SendClientMessage(playerid, -1, "You aren't a COP"); new id; if(sscanf(params,"u", id)) return SendClientMessage(playerid, -1, "Use: /cuff [id]"); if(id != INVALID_PLAYER_ID) { if(GetPlayerSpecialAction(id) != SPECIAL_ACTION_HANDSUP && morto[id] != true) return SendClientMessage(playerid, COLOR_GRAD2, "The player need be handsup,imo or dead!"); if(PlayerCuffed[id] > 0) return SendClientMessage(playerid, COLOR_GREY, "This player is already cuffed!"); if (ProxDetectorS(8.0, playerid, id)) { Cuffing(playerid, id); } } return 1; }
cmd_cuff(playerid, strval(targetplayer));
new cuffstring[10];
format(cuffstring, sizeof(cuffstring), "/cuff %i", GetPlayerTargetPlayer(playerid));
CallLocalFunction("OnPlayerCommandText","is", playerid, cuffstring);
dcmd_kill(playerid, params[]) //
{
#pragma unused params
if(Player[playerid][InDM] == true)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк nгo pode fazer isto agora!");
if(!VerificarRival(playerid))
return SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк nгo pode usar este comando com alguйm que nгo й de sua facзгo prуximo.");
if(Player[playerid][pLogged] == false)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк nгo estб logado para utilizar este comando!");
if(Player[playerid][InHospital] == true)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк nгo pode usar este comando agora!");
GetPlayerPos(playerid, Player[playerid][LastPos][0], Player[playerid][LastPos][1], Player[playerid][LastPos][2]);
SetTimerEx("AutoKill", 5000, false, "i", playerid);
SendClientMessage(playerid, COR_YELLOW,"Aguarde sem se mover.");
return 1;
}
Bem porque tu mandou msg eu respondo aqui:
tenta das seguintes formas: PHP код:
PHP код:
|
new cuffstring[10];
format(cuffstring, sizeof(cuffstring), "%i", GetPlayerTargetPlayer(playerid));
cmd_cuff(playerid, cuffstring);
Use isto...
new string[6]; valstr(string, GetPlayerTargetPlayer(playerid)); return cmd_cuff(playerid, string); |