01.04.2012, 21:10
Quote:
It's alright, I scripted like that when I was new to scripting too, just keep learning.
|
I have this
Код:
case DIALOG_LOGIN: { if ( !response ) return Kick ( playerid ); if( response ) { if(udb_hash(inputtext) == PlayerInfo[playerid][pPass]) { INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid); new tmp2[ 256 ], playername2[ MAX_PLAYER_NAME ] ; GetPlayerName(playerid, playername2, sizeof(playername2)); format(tmp2, sizeof(tmp2), "~w~Welcome ~n~~g~%s", playername2); GameTextForPlayer(playerid, tmp2, 5000, 1); SetTimerEx("UnsetFirstSpawn", 5000, false, "i", playerid); GivePlayerCash(playerid, PlayerInfo[playerid][pCash]); SetSpawnInfo(playerid, PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pSkin], PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z], 1.0, -1, -1, -1, -1, -1, -1); } else { ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Login","You have entered an incorrect password.\nType your password below to login.","Login","Quit"); } return 1; } } } if(dialogid == 5) { if(response) { new message[256+1]; if(listitem == 0) { format(message, 256, "You selected Los Santos Police Department, And got teleported to there!", listitem); SendClientMessage(playerid, 0xFFFFFFFF, message); SetPlayerPos(playerid, 1535.5732,-1675.6609,13.3828); } if(listitem == 1) { format(message, 256, "You selected Unity Station, And got teleported to there!", listitem); SendClientMessage(playerid, 0xFFFFFFFF, message); SetPlayerPos(playerid, 1729.6116,-1855.1116,13.4141); return 1; } } } return 0; }
Код:
CMD:teleport(playerid, param[]) { ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Teleport Menu", "Unity Station \n Los Santos Police Department", "Select", "Cancel"); return 1; }
Код:
#define DIALOG_REGISTER 1 #define DIALOG_LOGIN 2 #define DIALOG_AGE 3 #define DIALOG_SEX 4