{ SendCilentMessage(playerid, COLOR_NEWBIE, "Server closed the connection"); } } return 1; }
if(dialogid == 138)// They pressed the first button. { switch(138)// If you only have one dialog, then this isn't required, but it's neater for when you implement more dialogs. { case 1:// Our dialog! { switch(listitem)// Checking which listitem was selected { case 0:// The first item listed { PlayerInfo[playerid][pTut] = 1; gOoc[playerid] = 0; gNews[playerid] = 0; gFam[playerid] = 0; ClearChatbox(playerid); TogglePlayerControllable(playerid, 1); SetCamBack(playerid); DeletePVar(playerid, "MedicBill"); SetPlayerColor(playerid,TEAM_HIT_COLOR); SetPlayerInterior(playerid,0); SetPlayerPos(playerid, 1507.8495,-1688.9045,15.1903); SetPlayerFacingAngle(playerid, 174.1660); SetCameraBehindPlayer(playerid); SetPlayerVirtualWorld(playerid, 0); SetPlayerInterior(playerid,0); SetPlayerPos(playerid, 1507.8495,-1688.9045,15.1903); SetPlayerFacingAngle(playerid, 174.1660); SetCameraBehindPlayer(playerid); TogglePlayerControllable(playerid, 1); //some shitty rp messages here SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have spawned! Welcome to Larceny Roleplay. "); //set player stats PlayerInfo[playerid][pLevel] = 1; PlayerInfo[playerid][pDonateRank] = 3; GivePlayerCash(playerid, 150000); PlayerInfo[playerid][pMats] = 100; PlayerInfo[playerid][pPot] = 5; PlayerInfo[playerid][pCrack] = 5; PlayerInfo[playerid][pAccount] = 30000; PlayerInfo[playerid][pConnectTime] = 1; SetPlayerSkin(playerid, 7); PlayerInfo[playerid][pChar] = 7; PlayerInfo[playerid][pModel] = 7; } case 1: // The second item listed { SendCilentMessage(playerid, COLOR_NEWBIE, "Server closed the connection"); } } return 1; }
case 1:// Our dialog!
{
Yeah call me dumb, I'm just learning this dialog stuff :/
Код:
if(dialogid == 138)// They pressed the first button. { switch(138)// If you only have one dialog, then this isn't required, but it's neater for when you implement more dialogs. { case 1:// Our dialog! { switch(listitem)// Checking which listitem was selected { case 0:// The first item listed { PlayerInfo[playerid][pTut] = 1; gOoc[playerid] = 0; gNews[playerid] = 0; gFam[playerid] = 0; ClearChatbox(playerid); TogglePlayerControllable(playerid, 1); SetCamBack(playerid); DeletePVar(playerid, "MedicBill"); SetPlayerColor(playerid,TEAM_HIT_COLOR); SetPlayerInterior(playerid,0); SetPlayerPos(playerid, 1507.8495,-1688.9045,15.1903); SetPlayerFacingAngle(playerid, 174.1660); SetCameraBehindPlayer(playerid); SetPlayerVirtualWorld(playerid, 0); SetPlayerInterior(playerid,0); SetPlayerPos(playerid, 1507.8495,-1688.9045,15.1903); SetPlayerFacingAngle(playerid, 174.1660); SetCameraBehindPlayer(playerid); TogglePlayerControllable(playerid, 1); //some shitty rp messages here SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have spawned! Welcome to Larceny Roleplay. "); //set player stats PlayerInfo[playerid][pLevel] = 1; PlayerInfo[playerid][pDonateRank] = 3; GivePlayerCash(playerid, 150000); PlayerInfo[playerid][pMats] = 100; PlayerInfo[playerid][pPot] = 5; PlayerInfo[playerid][pCrack] = 5; PlayerInfo[playerid][pAccount] = 30000; PlayerInfo[playerid][pConnectTime] = 1; SetPlayerSkin(playerid, 7); PlayerInfo[playerid][pChar] = 7; PlayerInfo[playerid][pModel] = 7; } case 1: // The second item listed { SendCilentMessage(playerid, COLOR_NEWBIE, "Server closed the connection"); } } return 1; } |