|
|
|
|
#1 |
|
Big Clucker
![]() ![]() Join Date: Nov 2011
Posts: 69
Reputation: 0
|
Hello,
(This is a blank gamemode) 1) I am using Y_INI for the Saving System, how would I make it load a players Last coords? I have the floats defined: Code:
enum pInfo
{
// Other enum's
float:pPosX,
float:pPosY,
float:pPosZ,
}
Do I need to define justLogged and stuff like that? Can someone give me an example please. |
|
|
|
|
|
#2 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Jul 2011
Posts: 382
Reputation: 21
|
I would personally check the tutorial section, I have seen multiple tutorials for it.
|
|
|
|
|
|
#3 |
|
Big Clucker
![]() ![]() Join Date: Nov 2011
Posts: 69
Reputation: 0
|
I have looked and can;t see any :/.
|
|
|
|
|
|
#4 |
|
Big Clucker
![]() ![]() Join Date: Mar 2012
Posts: 157
Reputation: 6
|
1) Not sure
2) You could have a variable pNewbie, so when they're new, the pNewbie is 0, if it's 0, then a checkpoint is forced. For example pawn Code:
|
|
|
|
|
|
#5 | |
|
Big Clucker
![]() ![]() Join Date: Nov 2011
Posts: 69
Reputation: 0
|
Quote:
Code:
ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,""COLOR_WHITE"Success!",""COLOR_GREEN"Congratulations, you have successfully made an account!\nNow you will begin to start your adventure!","Ok",""); SpawnPlayer(playerid); PlayerInfo[playerid][pNewbie] += 1); Code:
public OnPlayerConnect(playerid)
{
if(fexist(UserPath(playerid)))
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,""COLOR_WHITE"Login",""COLOR_WHITE"Type your password below to login.","Login","Quit");
SpawnPlayer(playerid);
}
else
{
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,""COLOR_WHITE"Registering...",""COLOR_WHITE"Type your password below to register a new account.","Register","Quit");
SpawnPlayer(playerid);
}
if(PlayerInfo[playerid][pNewbie] == 1)
{
SetPlayerCheckpoint(playerid, -2737.3635,-2414.0317,5.2657, 3.0);
}
return 1;
}
Code:
C:\Users\Jordan\Desktop\0.3e Server\gamemodes\Gamemode.pwn(289) : error 001: expected token: ";", but found ")" C:\Users\Jordan\Desktop\0.3e Server\gamemodes\Gamemode.pwn(289) : error 029: invalid expression, assumed zero C:\Users\Jordan\Desktop\0.3e Server\gamemodes\Gamemode.pwn(289) : warning 215: expression has no effect Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 2 Errors. |
|
|
|
|
|
|
#6 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Jul 2010
Posts: 2,169
Reputation: 203
|
1.
Not using y_ini you can convert it by you're self (i'm not a y_ini person (file functions or dini )pawn Code:
EDIT: 2. Get you're defines/variables to registration system. pawn Code:
|
|
|
|
|
|
#7 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: Aug 2011
Location: Westland, Michigan
Posts: 898
Reputation: 96
|
pawn Code:
Considering the fact you have a random ) in between the 1 and the ;, just remove it. pawn Code:
Should work, if not incorrect. |
|
|
|
|
|
#8 |
|
Big Clucker
![]() ![]() Join Date: Nov 2011
Posts: 69
Reputation: 0
|
Thanks, how would I set a Var for it like pCheckpoint = 1; then I got to OnPlayerEnterCheckpoint case 1: blahh ?
|
|
|
|
|
|
#9 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Jul 2010
Posts: 2,169
Reputation: 203
|
@HarrySidwell
pawn Code:
|
|
|
|
|
|
#10 |
|
Big Clucker
![]() ![]() Join Date: Nov 2011
Posts: 69
Reputation: 0
|
No one get's me...
I have defined this in the Enum; Code:
[pCheckpoint] Code:
if(PlayerInfo[playerid][pNewbie] == 1)
{
SetPlayerCheckpoint(playerid, -2737.3635,-2414.0317,5.2657, 3.0);
PlayerInfo[playerid][pCheckpoint] = 1; // defined here
}
Case 1: { // stuff here } Why does it not work? (Im new to the checkpoint stuff) |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| A few questions ... | Danny. | Help Archive | 1 | 03/11/2010 01:55 PM |
| questions | Black_Sun1 | Help Archive | 4 | 31/10/2010 05:02 PM |
| Two questions | Crayon | Help Archive | 4 | 20/10/2010 10:27 PM |