@@iPanter maybe no
stock getPlayerName( playerid ) {
new gName[ 32 ]; GetPlayerName( playerid, gName, sizeof gName );
return gName;
}
YCMD:spinpointsforall( playerid, params[], help ) {
if( !PlayerInfo[ playerid ][ pAdmin ] )
return SCM( playerid, -1, "Nu ai admin" );
new points;
if( sscanf( params, "i", points ) )
return SCM( playerid, -1, "/spinpointsforall <total points>" );
new gQuery[ 128 ], string[ 128 ];
foreach( new x : Player ) {
if( IsPlayerConnected( x ) || x != INVALID_PLAYER_ID ) {
format( string, sizeof string, "* Administratorul %s ti-a dat %d puncte de spin. (Total: %d)", getPlayerName( playerid ), points, PlayerInfo[ x ][ pSpinPoints ] );
SCM( x, COLOR_YELLOW, string );
PlayerInfo[ x ][ pSpinPoints ] = points;
format( gQuery, sizeof gQuery, "UPDATE `users` SET `SpinPoints` = '%d' WHERE `id` = '%d'", PlayerInfo[ x ][ pSpinPoints ], PlayerInfo[ x ][ pSQLID ] );
mysql_tquery( SQL, gQuery );
}
}
format( string, sizeof string, "* Ai acordat %d puncte de spin tuturor jucatorilor online.", points );
SCM( x, COLOR_YELLOW, string );
return true;
}