18.12.2017, 17:21
PHP код:
//zcmd
CMD:telep(playerid, params[])
{
ShowPlayerDialog(playerid, 1337, DIALOG_STYLE_PASSWORD, "Enter password", "Enter password", "Enter", "Cancel");
return 1;
}
//OnDialogResponse
case 1337:
{
if(!response) return 1;
if(strlen(inputtext) && !strcmp(inputtext, "YOURPASSWORD"))
{
SetPlayerPos(playerid, X, Y, Z); //coords
SendClientMessage(playerid, -1, "You are teleported");
}
else SendClientMessage(playerid, -1, "Wrong password");
}