16.08.2016, 12:51
Script I use: Mine
Problem description:I think that I already tryed 80% possibble combinations,and looked over 10 theards about this problem, but here now I'm asking it directly... What I want to make is next: If player is registered I want him to skip class selection and to spawn automatcally on his place (his place depends about in which team he is) I created that players team save (Y_INI saving) so that's ok...BUT if player isn't registered then I want him to choose class...I will post you only 1 of combinations that I tryed (not working ofc) so that you know what I'm talking about ... P.S. I also tryed with SetSpawnInfo and SpawnPlayer, that's not working either...
Part of code:
Problem description:I think that I already tryed 80% possibble combinations,and looked over 10 theards about this problem, but here now I'm asking it directly... What I want to make is next: If player is registered I want him to skip class selection and to spawn automatcally on his place (his place depends about in which team he is) I created that players team save (Y_INI saving) so that's ok...BUT if player isn't registered then I want him to choose class...I will post you only 1 of combinations that I tryed (not working ofc) so that you know what I'm talking about ... P.S. I also tryed with SetSpawnInfo and SpawnPlayer, that's not working either...
Part of code:
Код:
if(fexist(UserPath(playerid))) { SpawnIgraca(playerid); } else { new string[128]; SetPlayerPos(playerid, "koordinate"); SetPlayerFacingAngle(playerid, "koordinate"); SetPlayerInterior(playerid, "koordinate"); SetPlayerCameraPos(playerid, "koordinate"); SetPlayerCameraLookAt(playerid, "koordinate"); SetPlayerTeamFromClass(playerid, classid); PlayerClass[playerid] = classid; switch (classid) { case 0,1,2,3,4,5,6: { if(classid == 0 || classid == 1 || classid == 2 || classid == 3 || classid == 4 || classid == 5 || classid == 6 ) { //Not important } } case 7,8,9: { if(classid == 7 || classid == 8 || classid == 9 || classid == 10) { //Not important } } case 10,11,12,13: { if(classid == 11 || classid == 12 || classid == 13 || classid == 14) { //Not important } } case 14,15,16,17,18: { if(classid == 15 || classid == 16 || classid == 17 || classid == 18 || classid == 19) { //Not important } } case 19,20,21,22: { if(classid == 20 || classid == 21 || classid == 22 || classid == 23 || classid == 24) { //Not important } } } } return 1; } stock SpawnIgraca(playerid) { if(PlayerInfo[playerid][pTeam] == 1) { SetPlayerPos(playerid, 0, 0, 0); SetPlayerInterior(playerid, 0); } if(PlayerInfo[playerid][pTeam] == 2) { SetPlayerPos(playerid, 0, 0, 0); SetPlayerInterior(playerid, 0); } if(PlayerInfo[playerid][pTeam] == 3) { SetPlayerPos(playerid, 0, 0, 0); SetPlayerInterior(playerid, 0); } if(PlayerInfo[playerid][pTeam] == 4) { SetPlayerPos(playerid, 0, 0, 0); SetPlayerInterior(playerid, 0); } if(PlayerInfo[playerid][pTeam] == 5) { SetPlayerPos(playerid, 0, 0, 0); SetPlayerInterior(playerid, 0); } return 1; }