How to??? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to??? (
/showthread.php?tid=250972)
How to??? -
[JnA]DukeNukem - 25.04.2011
I want to skip class selection if a user is already registered
so I want to do something like
Код:
new File[50];
format(File, sizeof(File), PFiles, pName(playerid));
if(fexist(File))
- if the file excists player should be spawned with
SetPlayerPos(playerid, PVar[playerid][pLastX], PVar[playerid][pLastY], PVar[playerid][pLastZ])
and if it doesnt exist then skin selection should do it's thing
Код:
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, -2661.3604, 1932.9404, 225.7578);
SetPlayerFacingAngle(playerid, 213.0498);
return 1;
}
Re: How to??? -
[JnA]DukeNukem - 25.04.2011
anyone ??
Re: How to??? -
Anteino - 25.04.2011
pawn Код:
new Registered[MAX_PLAYERS] // should be globally declared
...
new File[50];
format(File, sizeof(File), PFiles, pName(playerid));
if(fexist(File)){
Registered[playerid] = 1;
...
public OnPlayerRequestClass(playerid, classid){
if(Registered[playerid] == 1){
return 1;
}
else{
// the class thing
}
return 1;
}
public OnPlayerDisconnect(playerid){
Registered[playerid] = 0;
}
Isn't that what you want?
Re: How to??? -
[JnA]DukeNukem - 25.04.2011
It isn't skipping skin selection....
Re: How to??? -
Shoaib - 25.04.2011
erm dunno