31.01.2012, 18:28
Por ejemplo un comando que es para que el jugador levante las manos, pero debe estar de pie y no debe de estar herido.
їPuedes guiarte?
pawn Код:
// ZCMD - Si usas procesador de comandos como el zcmd.
new Injured[MAX_PLAYERS]; // Donde estбn tus variables
zcmd(handsup, playerid, params[]) // Comando
{
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT && Injured[playerid] == 0) // Condiciones
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
return 1;
}
else return SendClientMessage(playerid, COLOR_GRAD2, " No puedes usar este comando ahora.");
}
// Si no usas procesador de comandos.
new Injured[MAX_PLAYERS]; // Donde estбn tus variables
if(strcmp(cmd, "/rendirse", true) == 0)
{
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT && Injured[playerid] == 0)
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
}
return 1;
}