08.10.2016, 18:25
Hello, I have edited the skiptut command, but the problem is I can skip tut someone who is NOT inside a tutorial and I CAN'T skip someone who IS in side the tutorial.
++ I have added that if people spawn they will see the dialog but it isn't showing up at all
See command:
++ I have added that if people spawn they will see the dialog but it isn't showing up at all
See command:
PHP код:
CMD:skiptut(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 4)
return SendClientMessage(playerid, COLOR_GRAD1, "You're not authorized to use that command!");
if(AdminDuty[playerid] != 1 && PlayerInfo[playerid][pAdmin] < 6)
return SendClientMessage(playerid,COLOR_WHITE, "You're not on-duty as admin. To access your admin commands you must be on-duty. Type /aduty to go on-duty.");
new
giveplayerid;
if(sscanf(params, "u", giveplayerid))
return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /skiptut [playerid/partofname]");
if(InsideTut[giveplayerid] >= 1) return SendClientMessage(playerid, COLOR_GRAD2, "This player is not inside the tutorial!");
if(IsPlayerConnected(giveplayerid)) {
for(new t = 0; t < 54; t++) {
TextDrawHideForPlayer(giveplayerid, TutTxtDraw[t]);
}
SetPlayerInterior(giveplayerid, 0);
SetPlayerVirtualWorld(giveplayerid, 0);
TogglePlayerControllable(giveplayerid, 1);
SetPlayerPos(giveplayerid, 1773.459350, -1942.273437, 13.569922);
SetPlayerFacingAngle(giveplayerid, 329.64);
SetCameraBehindPlayer(giveplayerid);
InsideTut[giveplayerid] = 0;
DeletePVar(giveplayerid, "MedicBill");
SetPlayerColor(giveplayerid,TEAM_HIT_COLOR);
PlayerInfo[giveplayerid][pTut] = 1;
PlayerInfo[giveplayerid][pSex] = 1;
PlayerInfo[giveplayerid][pAge] = 25;
if(PlayerInfo[giveplayerid][pSex] == 1) {
PlayerInfo[giveplayerid][pSkin] = 299;
} else {
PlayerInfo[giveplayerid][pSkin] = 55;
}
SetPlayerSkin(giveplayerid, PlayerInfo[giveplayerid][pSkin]);
ClearChatbox(giveplayerid);
new string[128];
format(string, sizeof(string), "Welcome to Red Label Roleplay, %s.", GetPlayerNameEx(giveplayerid));
SendClientMessage(giveplayerid, COLOR_NEWS, string);
SetPVarInt(playerid, "VehicleRefund", 1);
SendClientMessageEx(playerid, COLOR_ORANGE, "* You have been allowed one free vehicle! (/vrefund)");
format(string, sizeof(string), "~w~Welcome~n~~y~%s", GetPlayerNameEx(giveplayerid));
GameTextForPlayer(giveplayerid, string, 5000, 1);
ShowPlayerDialogEx(playerid,231991,DIALOG_STYLE_MSGBOX,"{FF8040}WELCOME{FFFFFF}", "Welcome to Red Label Roleplay, if you have any further question feel free to ask them over /newb.\n\nIf you want one of our senior helpers to give you a tour around the server please use /requesthelp.","OK","");
new
motdstring[128];
format(motdstring, sizeof(motdstring), "News: %s", GlobalMOTD);
SendClientMessage(giveplayerid, COLOR_WHITE, motdstring);
DeletePVar(giveplayerid, "IsFrozen");
TutorialProgress[giveplayerid] = 0;
}
return 1;
}