23.11.2010, 14:15
Gamemode..
Код:
else if(dialogid == 3) { if(!response) { SendClientMessage(playerid, COLOR_GREY, "[Error:] You have cancelled the request!"); } if (!strlen(inputtext)) { ShowPlayerDialogEx(playerid, 3); } SendRaceRequest(playerid, inputtext); }
Код:
public SendRaceRequest(playerid, toid) { if(IsPlayerConnected(toid)) { if(InRace[toid] == 0) { new racer[MAX_PLAYER_NAME+60]; format(racer, sizeof(racer), "[Race:] %s (ID:%d) wants to challenge you in a race.", PlayerName(playerid), playerid); SendClientMessage(toid, COLOR_WHITE, racer); SendClientMessage(toid, COLOR_WHITE, "[Race:] Use /accept race to accept the challenge!"); SendClientMessage(playerid, COLOR_WHITE, "[Info:] Successfully sent a request to the other player!"); } else { SendClientMessage(playerid, COLOR_GREY, "[Error:] The other player is already in a race!"); } } else { SendClientMessage(playerid, COLOR_GREY, "[Error:] The other player is not connected!"); } return 1; }