[HELP] How to make a simple Tutorial script
#1

I need a Tutorial script for my new Roleplay Gamemode.
It should work like this, when a player finishes the /register command, they will be sended to a spcial camera view and be freezed, at that camera view the tutorial will start
by using SendClientMessage texts etc.

I guess we need to make a timer for the camera.

Anyway, I need full help to complete this script, I will give you my /register command if you need to take a look at it.

Код:
if (strcmp(cmd, "/register", true) ==0)
	{
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, 0xC0C0C0FF, "	USAGE: /register [password]");
			return 1;
		}
		if (gPlayerAccount[playerid] == 1)
		{
			SendClientMessage(playerid, 0xC0C0C0FF, "	That nickname is already registered");
			return 1;
		}

		strmid(PlayerInfo[playerid][pPassword], tmp, 0, strlen(cmdtext), 255);
		String(PlayerInfo[playerid][pPassword]);
		GetPlayerName(playerid, playername, sizeof(playername));
		format(string, sizeof(string), "%s.cer", playername);
		new File: file = fopen(string, io_read);
		if (file)
		{
			SendClientMessage(playerid, 0xC0C0C0FF, "	That name is already registered");
			fclose(file);
			return 1;
		}
		new File:hFile;
		hFile = fopen(string, io_append);
		new var[32];//
        format(var, 32, "%s\n", PlayerInfo[playerid][pPassword]);fwrite(hFile, var);
		PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
        format(var, 32, "Cash:%d\n",PlayerInfo[playerid][pCash]);fwrite(hFile, var);
		fclose(hFile);
		SendClientMessage(playerid, 0xFFFFFFFF, "You have been successfully registered, you will now be sent to the tutorial, please pay attenton.");
		OnPlayerLogin(playerid,PlayerInfo[playerid][pPassword]);
        return 1;
	}
Thanks for the help, but if you tells me to look in the GF script, I dont understand anything in there anyway...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)