Tutorial is not working
#1

Alright, so I am currently scripting a tutorial for my gamemode, and it is not working, it should be, but it just is not, I do not quite understand it... Here is the script:

pawn Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerPos(playerid, -83.2991,1124.3035,19.7422);
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid, 0);
    INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
    SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
    GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
    GivePlayerWeapon(playerid, PlayerInfo[playerid][pWeaponPistol], PlayerInfo[playerid][pWeaponPistolAmmo]);
    GivePlayerWeapon(playerid, PlayerInfo[playerid][pWeaponShotgun], PlayerInfo[playerid][pWeaponShotgunAmmo]);
    GivePlayerWeapon(playerid, PlayerInfo[playerid][pWeaponSMG], PlayerInfo[playerid][pWeaponSMGAmmo]);
    GivePlayerWeapon(playerid, PlayerInfo[playerid][pWeaponAssault], PlayerInfo[playerid][pWeaponAssaultAmmo]);
    GivePlayerWeapon(playerid, PlayerInfo[playerid][pWeaponThrown], PlayerInfo[playerid][pWeaponThrownAmmo]);
    GivePlayerWeapon(playerid, PlayerInfo[playerid][pWeaponCombat], 1);
    GivePlayerWeapon(playerid, PlayerInfo[playerid][pWeaponSpray], PlayerInfo[playerid][pWeaponSprayAmmo]);
    if(PlayerInfo[playerid][Tutorial] = 0)
    {
        TogglePlayerControllable(playerid, 0);
        if(PlayerInfo[playerid][pOrigin] = 1)
        {
            SetPlayerCameraPos(playerid, -91.7157,1111.8914,24.0230);
            SetPlayerCameraLookAt(playerid, 79.3526,1131.7236,19.7422);
            SendClientMessage(playerid, 0xFF0000FF, "|__________________________________|Origin Refuges|__________________________________|");
            SendClientMessage(playerid, 0xFF0000FF, "Each origin, (American, European, Asian, German, Taliban, Other) has their own");
            SendClientMessage(playerid, 0xFF0000FF, "Refuge, or place for their civilians. Their armies can restock here, help people, etc.");
            SendClientMessage(playerid, 0xFF0000FF, "They cannot attack you. You are almost always safe in your origin's refuges being");
            SendClientMessage(playerid, 0xFF0000FF, "Administrators are the only people that can grant attacks on other origin's refuges.");
            SendClientMessage(playerid, 0xFF0000FF, "Around the refuges, you can usually buy and find goods for surival via /search!");
            SendClientMessage(playerid, 0xFFFF9DFF, "----------Let this message sink in, you will have to wait 30 seconds here.----------");
            SetTimer("TutorialTimer1", 30000, false);
        }
    }

    return 1;
}
Everything above the First tutorial piece is fine, so it is nothing with them.
Reply
#2

try making SetTimer to SetTimerEx?

pawn Код:
SetTimerEx("TutorialTimer1", 30000, false, "i", playerid);
that is if your public TutorialTimer1 is something like this

pawn Код:
public TutorialTimer1(playerid)
Reply
#3

Quote:
Originally Posted by RollTi
Посмотреть сообщение
try making SetTimer to SetTimerEx?

pawn Код:
SetTimer("TutorialTimer1", 30000, false, "i", playerid);
that is if your public TutorialTimer1 is something like this

pawn Код:
public TutorialTimer1(playerid)
^^ Do that. I made the same mistake on a hospital timer, and nearly tor my hair out trying to figure out what the hell was wrong lol.
Reply
#4

I had tried that, and it starts, but it doesn't seem to switch chats at all to the next "Slide" if you will.
Reply
#5

I have figured it out, somehow, my registration system is bugged and by deleting an
pawn Код:
if
fixed it. Thanks for all your help, you have both been +Rep'ed!
Reply
#6

i have done this before so far.

here is what i do after the RP Quiz i sent a message like

Код:
Welcome to 'Server Name'

Blahblah blah blah
with SendClientMessage then i set a timer like i post above with SetTimerEx
then i create a public callback then

i sent a SendClientMessage then i create again repeat it twice then stop adding SetTimerEx in the last part if you want to stop the RP Tutorial then you need to

pawn Код:
SetCameraBehindPlayer(playerid);
//Spawn Funcs
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)