05.06.2008, 16:54
Quote:
Originally Posted by Andre9977
PS: It's "Useful Functions", not "Usefull functions".
|

SendClientMessageToAllEx(exception, color, const message[])
This function sends a message to all players, except for 1 player. (exception)
Code:
stock SendClientMessageToAllEx(exception, color, const message[]) { for(new i; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(i != exception) { SendClientMessage(i, color, message); } } } }
Returns the ID of the player driving in the vehicle. Returns '-1' if nobody is driving in the vehicle.
Code:
stock GetVehicleDriver(vehicleid) { for(new i; i<MAX_PLAYERS; i++) { if (IsPlayerInVehicle(i, vehicleid)) { if(GetPlayerState(i) == 2) { return i; } } } return -1; }