31.10.2012, 01:29
i add sendclientmessagetoall when player join leave blabla and when join message appear but original grey message to how i can disable this old message?
public OnPlayerConnect(playerid) { new string[64], pName[MAX_PLAYER_NAME]; GetPlayerName(playerid,pName,MAX_PLAYER_NAME); format(string,sizeof string,"%s has joined the server",pName); SendClientMessageToAll(yellow,string); HaveTicket[playerid] = 0; TextDrawShowForPlayer(playerid, Textdraw0); TextDrawShowForPlayer(playerid, Textdraw1); TextDrawShowForPlayer(playerid, Textdraw2); TextDrawShowForPlayer(playerid, Textdraw3); TextDrawShowForPlayer(playerid, Textdraw4); TextDrawShowForPlayer(playerid, Textdraw5); TextDrawShowForPlayer(playerid, Textdraw6); TextDrawShowForPlayer(playerid, Textdraw7); piazzamento[playerid] = 0; gareggiando[playerid] = 0; TogglePlayerClock(playerid, 0); Posizione[playerid] = 0; box[playerid] = TextDrawCreate(240.000000,350,"_"); TextDrawLetterSize(box[playerid],0.8,4.999996); TextDrawUseBox(box[playerid],1); TextDrawBoxColor(box[playerid],0x00000060); TextDrawTextSize(box[playerid],400,0); speedo[playerid] = TextDrawCreate(240.000000, 350.000000, "Speed:"); TextDrawBackgroundColor(speedo[playerid], 255); TextDrawFont(speedo[playerid], 1); TextDrawLetterSize(speedo[playerid], 0.500000, 1.500000); TextDrawColor(speedo[playerid], 0xFF0000FF); TextDrawSetOutline(speedo[playerid], 1); TextDrawSetProportional(speedo[playerid], 1); TextDrawSetShadow(speedo[playerid], 1); kmh[playerid] = TextDrawCreate(300.000000, 350.000000, "_"); TextDrawBackgroundColor(kmh[playerid], 255); TextDrawFont(kmh[playerid], 1); TextDrawLetterSize(kmh[playerid], 0.500000, 1.500000); TextDrawColor(kmh[playerid], 0xFFFFFFAA); TextDrawSetOutline(kmh[playerid], 1); TextDrawSetProportional(kmh[playerid], 1); TextDrawSetShadow(kmh[playerid], 1); hp[playerid] = TextDrawCreate(240.000000, 365.000000, "Health:"); TextDrawBackgroundColor(hp[playerid], 255); TextDrawFont(hp[playerid], 1); TextDrawLetterSize(hp[playerid], 0.500000, 1.500000); TextDrawColor(hp[playerid], 0x00C2ECFF); TextDrawSetOutline(hp[playerid], 1); TextDrawSetProportional(hp[playerid], 1); TextDrawSetShadow(hp[playerid], 1); hpcol[playerid] = TextDrawCreate(300.000000, 365.000000, "_"); TextDrawBackgroundColor(hpcol[playerid], 255); TextDrawFont(hpcol[playerid], 1); TextDrawLetterSize(hpcol[playerid], 0.500000, 1.500000); TextDrawColor(hpcol[playerid], 0xFFFFFFAA); TextDrawSetOutline(hpcol[playerid], 1); TextDrawSetProportional(hpcol[playerid], 1); TextDrawSetShadow(hpcol[playerid], 1); veh[playerid] = TextDrawCreate(240.000000, 380.000000, "Car:"); TextDrawBackgroundColor(veh[playerid], 255); TextDrawFont(veh[playerid], 1); TextDrawLetterSize(veh[playerid], 0.500000, 1.500000); TextDrawColor(veh[playerid], 0xFFFF00FF); TextDrawSetOutline(veh[playerid], 1); TextDrawSetProportional(veh[playerid], 1); TextDrawSetShadow(veh[playerid], 1); vehname[playerid] = TextDrawCreate(300.000000, 380.000000, "_"); TextDrawBackgroundColor(vehname[playerid], 255); TextDrawFont(vehname[playerid], 1); TextDrawLetterSize(vehname[playerid], 0.500000, 1.500000); TextDrawColor(vehname[playerid], 0xFFFFFFAA); TextDrawSetOutline(vehname[playerid], 1); TextDrawSetProportional(vehname[playerid], 1); TextDrawSetShadow(vehname[playerid], 1); SetPVarInt(playerid,"LastID",-1); GameTextForPlayer(playerid, "~g~W~r~e~y~l~b~c~w~o~g~m~y~e!", 5000, 1); AutoRepairUsed[playerid] = 0; AutoRepairTrigger[playerid] = 0; new name[MAX_PLAYER_NAME]; //Making a new variable called 'name'. name[MAX_PLAYER_NAME] is created so we can use it to get player's name. GetPlayerName(playerid,name,sizeof(name)); //Get player's name if(fexist(Path(playerid))) /* Check if the connected user is registered or not. fexist stands for file exist. So if file exist in the files(Path(playerid)),*/ {// then INI_ParseFile(Path(playerid),"loadaccount_user", .bExtra = true, .extra = playerid); //Will load user's data using INI_Parsefile. ShowPlayerDialog(playerid,dlogin,DIALOG_STYLE_INPUT,"Login","Welcome back. This account is registered. \nInsert your password to login to your account","Login","Quit");/*A dialog with input style will appear so you can insert your password to login.*/ } else //If the connected user is not registered, {//then we will 'force' him to register :) ShowPlayerDialog(playerid,dregister,DIALOG_STYLE_INPUT,"Register","Welcome! This account is not registered.\nEnter your own password to create a new account.","Register","Quit"); return 1; } dm1[playerid] = 0; IsAtDMArea[playerid] = 0; IsAtDM[playerid] = 0; RemoveBuildingForPlayer(playerid, 16336, -225.1875, 1394.8359, 68.5781, 0.25); RemoveBuildingForPlayer(playerid, 16335, -225.1875, 1394.8359, 68.5781, 0.25); return 1; }
format(string,sizeof string,"%s has joined the server",pName);
SendClientMessageToAll(yellow,string);