SA-MP Forums Archive
HELP HELP - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: HELP HELP (/showthread.php?tid=290097)



HELP HELP - Buzzbomb - 14.10.2011

I dont know what it is but when a player Connects ID 0 always respawns ...... Someone please Help me...

pawn Код:
forward SpawnLastSaved(playerid);
public SpawnLastSaved(playerid)
{
    new name[MAX_PLAYER_NAME], file[256];
    GetPlayerName(i, name, sizeof(name));
    format(file, sizeof(file), ARS_ACCOUNTS, name);
    SetPlayerPos(i, dini_Float(file, "LocX"),dini_Float(file,"LocY"),dini_Float(file,"LocZ"));
    SetPlayerFacingAngle(i,dini_Float(file,"LocA"));
    SetPlayerInterior(i,dini_Int(file,"LocI"));
    SpawnPlayer(i);
    return 1;
}



Re: HELP HELP - PowerPC603 - 14.10.2011

Quote:
Originally Posted by Buzzbomb
Посмотреть сообщение
I dont know what it is but when a player Connects ID 0 always respawns ...... Someone please Help me...

pawn Код:
forward SpawnLastSaved(playerid);
public SpawnLastSaved(playerid)
{
    new name[MAX_PLAYER_NAME], file[256];
    GetPlayerName(i, name, sizeof(name));
    format(file, sizeof(file), ARS_ACCOUNTS, name);
    SetPlayerPos(i, dini_Float(file, "LocX"),dini_Float(file,"LocY"),dini_Float(file,"LocZ"));
    SetPlayerFacingAngle(i,dini_Float(file,"LocA"));
    SetPlayerInterior(i,dini_Int(file,"LocI"));
    SpawnPlayer(i);
    return 1;
}
pawn Код:
forward SpawnLastSaved(playerid);
public SpawnLastSaved(playerid)
{
    new name[MAX_PLAYER_NAME], file[256];
    GetPlayerName(playerid, name, sizeof(name));
    format(file, sizeof(file), ARS_ACCOUNTS, name);
    SetPlayerPos(playerid, dini_Float(file, "LocX"),dini_Float(file,"LocY"),dini_Float(file,"LocZ"));
    SetPlayerFacingAngle(playerid,dini_Float(file,"LocA"));
    SetPlayerInterior(playerid,dini_Int(file,"LocI"));
    SpawnPlayer(playerid);
    return 1;
}
You put "i" instead of playerid in every line.
Didn't you get errors which states that variable "i" hasn't been defined?


Re: HELP HELP - Buzzbomb - 14.10.2011

Crap I copied What i was trying to change it was playerid I was what i was trying to see if it would stop .. but i didnt go through with i and its playerid witch is giving me the problem i guess or My scripting blows