04.03.2014, 10:54
pawn Code:
if( dialogid == 312 )//Darbuotju valdymas...
{
if( response )
{
if( listitem )
{
new
msg[ 128 ];
format( msg, 128, "TEST %i", listitem );
InfoMSG( playerid, msg );
}
}
return true;
}
if( dialogid == 312 )//Darbuotju valdymas...
{
if( response )
{
if( listitem )
{
new
msg[ 128 ];
format( msg, 128, "TEST %i", listitem );
InfoMSG( playerid, msg );
}
}
return true;
}
pawn Code:
|
case 1://Љiuo metu prisijungę darbuotojai
{
new
Index,
query[ 300 ],
query2[ 300 ],
str [ 1200 ];
format( query, 90, "UPDATE `zaidejai` SET `online` = '1' WHERE `vardas` = '%s'", GetPlayerNameEx( playerid ) );
mysql_query( query );
format( query, 200, "SELECT `vardas`,`darbas`,`online` FROM `zaidejai` WHERE `darbas` = '%d'",zInfo[ playerid ][ dyrikz ] );
mysql_query( query );
mysql_store_result();
if ( mysql_num_rows( ))
{
while( mysql_fetch_row( query2 ))
{
new
name[ MAX_PLAYER_NAME ],
factionid,
OnlineEx;
sscanf( query2, "p<|>s[24]ii", name, factionid, OnlineEx );
if ( !OnlineEx )
{
format( str, 1200, "%s%s - {FF0000}Atsijungęs\n{FFFFFF}", str, name );
Index++;
}
else
{
format( str, 1200, "%s%s - {00FF00}Prisijungęs\n{FFFFFF}", str, name );
Index++;
}
}
}
mysql_free_result();
if ( !Index )
{
ShowPlayerDialog( playerid, 312, DIALOG_STYLE_LIST, "{FF0000}» Jūsų darbuotojai", "{FF0000}Nėra nei vieno darbuotojo", "Gerai", "" );
}
else
{
ShowPlayerDialog( playerid, 312, DIALOG_STYLE_LIST, "{00FF00}» Jūsų darbuotojai", str, "Gerai", "" );
}
return 1;
}