05.01.2010, 16:21
Quote:
Originally Posted by » ραωпsтαг «
Uhh, someone wanted a /carwhisper command? Made something real quick, ifd you look in the old thread also, someone else did one using sscanf.
Try this .. obviously pNick would be replaced by your custom function or you can use mine what I posted some posts back. Anyways, try this untested but should work, let me know. Code:
dcmd_carwhisper(playerid, params[]) { new string[128], pCar, msg; pCar = GetPlayerVehicleID(playerid); msg = strval(params); if(!strlen(params)) return SendClientMessage(playerid, red, "USAGE: /carwhisper [message]"); for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && GetPlayerVehicleID(i) == pCar) { format(string, sizeof(string), "** (Car-Whisper) - %s[%d] %s", pNick(playerid), playerid, msg); SendClientMessage(i, yellow, string); } return 1; } |