Зарегистрировавшись у нас, вы сможете обсуждать, делиться и отправлять личные сообщения другим участникам нашего сообщества.
Зарегистрироваться!Приветствую многоуважаемые пользователи Pawno-Help.
Если есть у кого команда для смены скинов для лидеров во фракции на подобии /changeskin, или же /setskin.
Можете поделиться
Буду благодарен за команду .
CMD:changeskin ( playerid, params [ ] )
{
if ( sscanf ( params, "d", params [ 0 ] ) )return SendClientMessage ( playerid, COLOR_GREY,"Используйте: /changeskin [ид]" ) ;
if ( ! IsPlayerConnected ( params [ 0 ] ) ) return SendClientMessage ( playerid, COLOR_GREY,"Игрок не найден." ) ;
if ( PlayerInfo [ params [ 0 ] ] [ member ] != PlayerInfo [ playerid ] [ member ] ) return SendClientMessage ( playerid, COLOR_GREY,"Игрок не состоит в Вашей организации." ) ;
if ( ! IsPlayerInRangeOfPoint ( playerid, 5, pSystem [ params [ 0 ] ][ p_pos ] [ 0 ], pSystem [ params [ 0 ] ][ p_pos ] [ 1 ], pSystem [ params [ 0 ] ][ p_pos ] [ 2 ] ) || GetPlayerVirtualWorld ( params [ 0 ] ) != GetPlayerVirtualWorld ( playerid ) )return SendClientMessage ( playerid, COLOR_GREY,"Игрок слишком далеко." ) ;
new dialog_string [ max_rank * 48 ],
frac_id = PlayerInfo [ playerid ] [ member ] ;
for ( new j = 0; j < max_rank; j ++ )
{
if ( FracSkin [ frac_id - 1 ] [ PlayerInfo [ params [ 0 ] ] [ gender ] ] [ j ] == 1 )break ;
new line_string [ 32 ] ;
format ( line_string, 32, "%d\n", FracSkin [ frac_id - 1 ] [ PlayerInfo [ params [ 0 ] ] [ gender ] ] [ j ] ) ;
strcat ( dialog_string, line_string ) ;
}
SetPVarInt ( playerid, "frac_invite_sk_id", params [ 0 ] + 1 ) ;
ShowDialog ( playerid, 8452, DIALOG_STYLE_LIST, "Выбор одежды", dialog_string, "Сменить", "Отмена" ) ;
return 1;
}
В OnDialogResponse
case 8452:
{
if ( ! response )return DeletePVar ( playerid, "frac_invite_sk_id" ) ;
new pl_id = GetPVarInt ( playerid, "frac_invite_sk_id" ) - 1 ;
PlayerInfo [ pl_id ] [ org_skin ] = FracSkin [ PlayerInfo [ pl_id ] [ member ] - 1 ] [ PlayerInfo [ pl_id ] [ gender ] ] [ listitem ] ;
SetPlayerSkin ( pl_id, PlayerInfo [ pl_id ] [ org_skin ] ) ;
SetPlayerColor ( pl_id, FracInfo [ PlayerInfo [ pl_id ] [ member ] - 1 ] [ f_radar_color ] ) ;
is_fraction_duty { pl_id } = 1 ;
UpdateSql ( pl_id, "org_skin", PlayerInfo [ pl_id ] [ org_skin ] ) ;
new text_string [ 98 ] ;
format ( text_string, sizeof ( text_string ), "%s выдал Вам новую одежду.", PlayerInfo [ playerid ] [ name ] ) ;
SendClientMessage ( pl_id, 0x14A3FFFF, text_string ) ;
DeletePVar ( playerid, "frac_invite_sk_id" ) ;
}
}
От душиPawn:CMD:changeskin ( playerid, params [ ] ) { if ( sscanf ( params, "d", params [ 0 ] ) )return SendClientMessage ( playerid, COLOR_GREY,"Используйте: /changeskin [ид]" ) ; if ( ! IsPlayerConnected ( params [ 0 ] ) ) return SendClientMessage ( playerid, COLOR_GREY,"Игрок не найден." ) ; if ( PlayerInfo [ params [ 0 ] ] [ member ] != PlayerInfo [ playerid ] [ member ] ) return SendClientMessage ( playerid, COLOR_GREY,"Игрок не состоит в Вашей организации." ) ; if ( ! IsPlayerInRangeOfPoint ( playerid, 5, pSystem [ params [ 0 ] ][ p_pos ] [ 0 ], pSystem [ params [ 0 ] ][ p_pos ] [ 1 ], pSystem [ params [ 0 ] ][ p_pos ] [ 2 ] ) || GetPlayerVirtualWorld ( params [ 0 ] ) != GetPlayerVirtualWorld ( playerid ) )return SendClientMessage ( playerid, COLOR_GREY,"Игрок слишком далеко." ) ; new dialog_string [ max_rank * 48 ], frac_id = PlayerInfo [ playerid ] [ member ] ; for ( new j = 0; j < max_rank; j ++ ) { if ( FracSkin [ frac_id - 1 ] [ PlayerInfo [ params [ 0 ] ] [ gender ] ] [ j ] == 1 )break ; new line_string [ 32 ] ; format ( line_string, 32, "%d\n", FracSkin [ frac_id - 1 ] [ PlayerInfo [ params [ 0 ] ] [ gender ] ] [ j ] ) ; strcat ( dialog_string, line_string ) ; } SetPVarInt ( playerid, "frac_invite_sk_id", params [ 0 ] + 1 ) ; ShowDialog ( playerid, 8452, DIALOG_STYLE_LIST, "Выбор одежды", dialog_string, "Сменить", "Отмена" ) ; return 1; } В OnDialogResponse case 8452: { if ( ! response )return DeletePVar ( playerid, "frac_invite_sk_id" ) ; new pl_id = GetPVarInt ( playerid, "frac_invite_sk_id" ) - 1 ; PlayerInfo [ pl_id ] [ org_skin ] = FracSkin [ PlayerInfo [ pl_id ] [ member ] - 1 ] [ PlayerInfo [ pl_id ] [ gender ] ] [ listitem ] ; SetPlayerSkin ( pl_id, PlayerInfo [ pl_id ] [ org_skin ] ) ; SetPlayerColor ( pl_id, FracInfo [ PlayerInfo [ pl_id ] [ member ] - 1 ] [ f_radar_color ] ) ; is_fraction_duty { pl_id } = 1 ; UpdateSql ( pl_id, "org_skin", PlayerInfo [ pl_id ] [ org_skin ] ) ; new text_string [ 98 ] ; format ( text_string, sizeof ( text_string ), "%s выдал Вам новую одежду.", PlayerInfo [ playerid ] [ name ] ) ; SendClientMessage ( pl_id, 0x14A3FFFF, text_string ) ; DeletePVar ( playerid, "frac_invite_sk_id" ) ; } }