if(strcmp(cmd, "/enviartuto", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "[Comando:] /enviartuto [playerid/partofname] [razгo]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
new result[128];
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
//KickLog(string);
SendClientMessage(giveplayerid,COLOR_WHITE,string);
//PlayerInfo[playerid][pTut] = 1;
InitiateTutorial(giveplayerid);
format(string, 256, "{8B008B}%s foi enviado para o tutorial por %s", giveplayer, sendername);
SendClientMessageToAll(0x8B008BAA, string);
//Kick(giveplayerid);
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "[ERRO:] Esse player nгo estб logado.");
}
}
return 1;
}
if(strcmp(cmd, "/enviartuto", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "[Comando:] /enviartuto [playerid/partofname] [razгo]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
new result[128];
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /enviartuto [Player ID/Parte do Nick] [Razгo]");
return 1;
}
//KickLog(string);
SendClientMessage(giveplayerid,COLOR_WHITE,string);
//PlayerInfo[playerid][pTut] = 1;
InitiateTutorial(giveplayerid);
format(string, 256, "{8B008B}%s foi enviado para o tutorial por %s, Motivo: %s", giveplayer, sendername,(result));
SendClientMessageToAll(0x8B008BAA, string);
//Kick(giveplayerid);
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "[ERRO:] Esse player nгo estб logado.");
}
}
return 1;
}
public TutorialStateEight(playerid)
{
ClearScreen(playerid);
SendClientMessage(playerid, COLOR_YELLOW, "______________________________________|- Fim -|___________________________________________");
SendClientMessage(playerid, COLOR_WHITE, " ");
SendClientMessage(playerid, COLOR_WHITE, " - ");
SendClientMessage(playerid, COLOR_WHITE, " - Fim do tutorial");
SendClientMessage(playerid, COLOR_WHITE, " ");
SendClientMessage(playerid, COLOR_WHITE, " Esperamos que voce se divirta ;) ");
SendClientMessage(playerid, COLOR_YELLOW, "__________________________________________________________________________________________");
TextDrawHideForPlayer(playerid, topblack);
TextDrawHideForPlayer(playerid, bottomblack);
TogglePlayerControllable(playerid, true);
PlayerInfo[playerid][pTut] = 1;
if(PlayerInfo[playerid][pHvida] == 1)
{
if(PlayerInfo[playerid][pSex] == 1)
{
SetPlayerSkin(playerid, 188);
PlayerInfo[playerid][pSkin] = 188;
}
if(PlayerInfo[playerid][pSex] == 2)
{
SetPlayerSkin(playerid, 13);
PlayerInfo[playerid][pSkin] = 13;
}
PlayerInfo[playerid][pMissaoNewbie] = 1;
PlayerInfo[playerid][pBuLic] = 1;
SpawnPlayer(playerid);
}
else if(PlayerInfo[playerid][pHvida] == 2)
{
if(PlayerInfo[playerid][pSex] == 1)
{
SetPlayerSkin(playerid, 133);
PlayerInfo[playerid][pSkin] = 133;
}
if(PlayerInfo[playerid][pSex] == 2)
{
SetPlayerSkin(playerid, 225);
PlayerInfo[playerid][pSkin] = 225;
}
PlayerInfo[playerid][pMissaoNewbie] = 2;
PlayerInfo[playerid][pBuLic] = 0;
SpawnPlayer(playerid);
SetPlayerHealth(playerid, 30);
ApplyAnimation(playerid, "WUZI", "CS_Dead_Guy", 4.0, 0, 0, 0, 0, 0);
}
else if(PlayerInfo[playerid][pHvida] == 3)
{
if(PlayerInfo[playerid][pSex] == 1)
{
SetPlayerSkin(playerid, 188);
PlayerInfo[playerid][pSkin] = 188;
}
if(PlayerInfo[playerid][pSex] == 2)
{
SetPlayerSkin(playerid, 226);
PlayerInfo[playerid][pSkin] = 226;
}
PlayerInfo[playerid][pMissaoNewbie] = 3;
PlayerInfo[playerid][pBiLic] = 1;
PlayerInfo[playerid][pBuLic] = 1;
SpawnPlayer(playerid);
}
}
public TutorialStateEight(playerid)
{
ClearScreen(playerid);
SendClientMessage(playerid, COLOR_YELLOW, "______________________________________|- Fim -|___________________________________________");
SendClientMessage(playerid, COLOR_WHITE, " ");
SendClientMessage(playerid, COLOR_WHITE, " - ");
SendClientMessage(playerid, COLOR_WHITE, " - Fim do tutorial");
SendClientMessage(playerid, COLOR_WHITE, " ");
SendClientMessage(playerid, COLOR_WHITE, " Esperamos que voce se divirta ;) ");
SendClientMessage(playerid, COLOR_YELLOW, "__________________________________________________________________________________________");
TextDrawHideForPlayer(playerid, topblack);
TextDrawHideForPlayer(playerid, bottomblack);
TogglePlayerControllable(playerid, true);
if(PlayerInfo[playerid][pTut] == 1) return SpawnPlayer(playerid),1;
PlayerInfo[playerid][pTut] = 1;
if(PlayerInfo[playerid][pHvida] == 1)
{
if(PlayerInfo[playerid][pSex] == 1)
{
SetPlayerSkin(playerid, 188);
PlayerInfo[playerid][pSkin] = 188;
}
if(PlayerInfo[playerid][pSex] == 2)
{
SetPlayerSkin(playerid, 13);
PlayerInfo[playerid][pSkin] = 13;
}
PlayerInfo[playerid][pMissaoNewbie] = 1;
PlayerInfo[playerid][pBuLic] = 1;
SpawnPlayer(playerid);
}
else if(PlayerInfo[playerid][pHvida] == 2)
{
if(PlayerInfo[playerid][pSex] == 1)
{
SetPlayerSkin(playerid, 133);
PlayerInfo[playerid][pSkin] = 133;
}
if(PlayerInfo[playerid][pSex] == 2)
{
SetPlayerSkin(playerid, 225);
PlayerInfo[playerid][pSkin] = 225;
}
PlayerInfo[playerid][pMissaoNewbie] = 2;
PlayerInfo[playerid][pBuLic] = 0;
SpawnPlayer(playerid);
SetPlayerHealth(playerid, 30);
ApplyAnimation(playerid, "WUZI", "CS_Dead_Guy", 4.0, 0, 0, 0, 0, 0);
}
else if(PlayerInfo[playerid][pHvida] == 3)
{
if(PlayerInfo[playerid][pSex] == 1)
{
SetPlayerSkin(playerid, 188);
PlayerInfo[playerid][pSkin] = 188;
}
if(PlayerInfo[playerid][pSex] == 2)
{
SetPlayerSkin(playerid, 226);
PlayerInfo[playerid][pSkin] = 226;
}
PlayerInfo[playerid][pMissaoNewbie] = 3;
PlayerInfo[playerid][pBiLic] = 1;
PlayerInfo[playerid][pBuLic] = 1;
SpawnPlayer(playerid);
}
}
}
if(!strcmp(cmd, "/sairtuto", true))
{
PlayerInfo[playerid][pTut] = 1;
KillTimer(VARIAVEL_COM_O_TEMPO[playerid]);
SpawnPlayer(playerid);
return 1;
}
SetPVarInt(playerid,"Tuto",1);
SetPVarInt(playerid,"Tuto",0);
if(GetPVarInt(playerid,"Tuto") == 1)
{
// aqui a funзгo que leva ele pro tuto
}
if(strcmp(cmd, "/pulartuto", true) == 0)
{
if(GetPVarInt(playerid,"Tuto") == 1)
{
SetPVarInt(playerid,"Tuto",0);
SendClientMessage(playerid,0x404040FF,"Vocк pulou o Tutorial!");
SetPlayerHealth(playerid,0);
return 1;
}
SendClientMessage(playerid,0x404040FF,"Vocк nгo estб no tutorial!");
return 1;
}
Coloca isso para quando o player estive no tutorial
pawn Код:
pawn Код:
pawn Код:
pawn Код:
EDIT: O Codigo do pharrel sу vai pular o tuto quando ele for pra outra parte... O meu pula na hora... |