Player doesn't get his skin after spawn
#1

Hello so i made a code that after a player is choosing his gender then his race he will spawn with his gender skin
but it doesn't work and he spawns with cj skin that only happens upon register in the login everything is good

here is my code
pawn Код:
if(dialogid == RaceChoosing)
    {
       if(response)
       {
          if(listitem == 0)
          {
             pInfo[playerid][pRace] = 1;
             SendClientMessage(playerid,-1,"You will become Angel as soon as you make the application on forums.");
             INI_ParseFile(Path(playerid),"loadaccount_%s",.bExtra = true, .extra = playerid);
             SetSpawnInfo(playerid,0,pInfo[playerid][pSkin],-327.1662,1090.9407,19.7422,288.7162,0,0,0,0,0,0);
             SpawnPlayer(playerid);
          }
          if(listitem == 1)
          {
             pInfo[playerid][pRace] = 2;
             SendClientMessage(playerid,-1,"You will become Demon as soon as you make the application on forums.");
             INI_ParseFile(Path(playerid),"loadaccount_%s",.bExtra = true, .extra = playerid);
             SetSpawnInfo(playerid,0,pInfo[playerid][pSkin],-327.1662,1090.9407,19.7422,288.7162,0,0,0,0,0,0);
             SpawnPlayer(playerid);
          }
          if(listitem == 2)
          {
             pInfo[playerid][pRace] = 3;
             SendClientMessage(playerid,-1,"You will become Vampire as soon as you make the application on forums.");
             INI_ParseFile(Path(playerid),"loadaccount_%s",.bExtra = true, .extra = playerid);
             SetSpawnInfo(playerid,0,pInfo[playerid][pSkin],-327.1662,1090.9407,19.7422,288.7162,0,0,0,0,0,0);
             SpawnPlayer(playerid);
          }
          if(listitem == 3)
          {
             pInfo[playerid][pRace] = 4;
             SendClientMessage(playerid,-1,"You will become Werewolve as soon as you make the application on forums.");
             INI_ParseFile(Path(playerid),"loadaccount_%s",.bExtra = true, .extra = playerid);
             SetSpawnInfo(playerid,0,pInfo[playerid][pSkin],-327.1662,1090.9407,19.7422,288.7162,0,0,0,0,0,0);
             SpawnPlayer(playerid);

          }
          if(listitem == 4)
          {
             pInfo[playerid][pRace] = 5;
             SendClientMessage(playerid,-1,"You have choosen Human race.");
             INI_ParseFile(Path(playerid),"loadaccount_%s",.bExtra = true, .extra = playerid);
             SetSpawnInfo(playerid,0,pInfo[playerid][pSkin],-327.1662,1090.9407,19.7422,288.7162,0,0,0,0,0,0);
             SpawnPlayer(playerid);
          }
       }
    }
Reply
#2

i think you could do it like this but under onplayerspawn
PHP код:
    if(pInfo[playerid][pRace] = 1)
    {
        
SetPlayerSkin(playerid277);//or whatever skin you want
        
return 0;
    }
    if(
pInfo[playerid][pRace] = 2)
    {
        
SetPlayerSkin(playerid277);//or whatever skin you want
        
return 0;
    }
    if(
pInfo[playerid][pRace] = 3)
    {
        
SetPlayerSkin(playerid277);//or whatever skin you want
        
return 0;
    }
    if(
pInfo[playerid][pRace] = 4)
    {
        
SetPlayerSkin(playerid277);//or whatever skin you want
        
return 0;
    } 
Reply
#3

Nope that will just ruin the gamemode and glitch it ass hell. and this is a roleplay gamemode its not suppose to work like that
Reply
#4

You Must Do it Like That !! but correct it like you have in the script
Quote:

if(pInfo[playerid][pRace] = 1)
{
if (pinfo'(playerid)(gender) = male SetPlayerSkin(playerid, 217);//or whatever skin you want
if (pinfo'(playerid)(gender) = female SetPlayerSkin(playerid, 214);//or whatever skin you want


return 0;
}
}

Reply
#5

Quote:
Originally Posted by DarkLored
Посмотреть сообщение
Nope that will just ruin the gamemode and glitch it ass hell. and this is a roleplay gamemode its not suppose to work like that
No it won't. Maybe you should actually try it.

Also, you have pRace and pSkin. Are they the same? Where does pSkin get set. You aren't providing all the code.
Reply
#6

I know what codes do at a specific callback and what he gave me is not for roleplay servers it will just set the skin depends on the race and that's not what i asked for help
Reply
#7

Can someone help me with this?
Reply
#8

Can i get help please guys? i really need some.
Reply
#9

Quote:
Originally Posted by DarkLored
Посмотреть сообщение
Hello so i made a code that after a player is choosing his gender then his race he will spawn with his gender skin
but it doesn't work and he spawns with cj skin that only happens upon register in the login everything is good

here is my code
pawn Код:
if(dialogid == RaceChoosing)
    {
       if(response)
       {
          if(listitem == 0)
          {
             pInfo[playerid][pRace] = 1;
             SendClientMessage(playerid,-1,"You will become Angel as soon as you make the application on forums.");
             INI_ParseFile(Path(playerid),"loadaccount_%s",.bExtra = true, .extra = playerid);
             SetSpawnInfo(playerid,0,pInfo[playerid][pSkin],-327.1662,1090.9407,19.7422,288.7162,0,0,0,0,0,0);
//SetPlayerSkin(playerid, yourskinidhere);
             SpawnPlayer(playerid);
          }
          if(listitem == 1)
          {
             pInfo[playerid][pRace] = 2;
             SendClientMessage(playerid,-1,"You will become Demon as soon as you make the application on forums.");
             INI_ParseFile(Path(playerid),"loadaccount_%s",.bExtra = true, .extra = playerid);
             SetSpawnInfo(playerid,0,pInfo[playerid][pSkin],-327.1662,1090.9407,19.7422,288.7162,0,0,0,0,0,0);
//SetPlayerSkin(playerid, yourskinidhere);
             SpawnPlayer(playerid);
          }
          if(listitem == 2)
          {
             pInfo[playerid][pRace] = 3;
             SendClientMessage(playerid,-1,"You will become Vampire as soon as you make the application on forums.");
             INI_ParseFile(Path(playerid),"loadaccount_%s",.bExtra = true, .extra = playerid);
             SetSpawnInfo(playerid,0,pInfo[playerid][pSkin],-327.1662,1090.9407,19.7422,288.7162,0,0,0,0,0,0);
//SetPlayerSkin(playerid, yourskinidhere);
             SpawnPlayer(playerid);
          }
          if(listitem == 3)
          {
             pInfo[playerid][pRace] = 4;
             SendClientMessage(playerid,-1,"You will become Werewolve as soon as you make the application on forums.");
             INI_ParseFile(Path(playerid),"loadaccount_%s",.bExtra = true, .extra = playerid);
             SetSpawnInfo(playerid,0,pInfo[playerid][pSkin],-327.1662,1090.9407,19.7422,288.7162,0,0,0,0,0,0);
//SetPlayerSkin(playerid, yourskinidhere);
             SpawnPlayer(playerid);

          }
          if(listitem == 4)
          {
             pInfo[playerid][pRace] = 5;
             SendClientMessage(playerid,-1,"You have choosen Human race.");
             INI_ParseFile(Path(playerid),"loadaccount_%s",.bExtra = true, .extra = playerid);
             SetSpawnInfo(playerid,0,pInfo[playerid][pSkin],-327.1662,1090.9407,19.7422,288.7162,0,0,0,0,0,0);
//SetPlayerSkin(playerid, yourskinidhere);
             SpawnPlayer(playerid);
          }
       }
    }
Do you mean like this?

pawn Код:
if(dialogid == RaceChoosing)
    {
       if(response)
       {
          if(listitem == 0)
          {
             pInfo[playerid][pRace] = 1;
             SendClientMessage(playerid,-1,"You will become Angel as soon as you make the application on forums.");
             INI_ParseFile(Path(playerid),"loadaccount_%s",.bExtra = true, .extra = playerid);
             SetSpawnInfo(playerid,0,pInfo[playerid][pSkin],-327.1662,1090.9407,19.7422,288.7162,0,0,0,0,0,0);
             SpawnPlayer(playerid);
          }
          if(listitem == 1)
          {
             pInfo[playerid][pRace] = 2;
             SendClientMessage(playerid,-1,"You will become Demon as soon as you make the application on forums.");
             INI_ParseFile(Path(playerid),"loadaccount_%s",.bExtra = true, .extra = playerid);
             SetSpawnInfo(playerid,0,pInfo[playerid][pSkin],-327.1662,1090.9407,19.7422,288.7162,0,0,0,0,0,0);
             SpawnPlayer(playerid);
          }
          if(listitem == 2)
          {
             pInfo[playerid][pRace] = 3;
             SendClientMessage(playerid,-1,"You will become Vampire as soon as you make the application on forums.");
             INI_ParseFile(Path(playerid),"loadaccount_%s",.bExtra = true, .extra = playerid);
             SetSpawnInfo(playerid,0,pInfo[playerid][pSkin],-327.1662,1090.9407,19.7422,288.7162,0,0,0,0,0,0);
             SpawnPlayer(playerid);
          }
          if(listitem == 3)
          {
             pInfo[playerid][pRace] = 4;
             SendClientMessage(playerid,-1,"You will become Werewolve as soon as you make the application on forums.");
             INI_ParseFile(Path(playerid),"loadaccount_%s",.bExtra = true, .extra = playerid);
             SetSpawnInfo(playerid,0,pInfo[playerid][pSkin],-327.1662,1090.9407,19.7422,288.7162,0,0,0,0,0,0);
             SpawnPlayer(playerid);

          }
          if(listitem == 4)
          {
             pInfo[playerid][pRace] = 5;
             SendClientMessage(playerid,-1,"You have choosen Human race.");
             INI_ParseFile(Path(playerid),"loadaccount_%s",.bExtra = true, .extra = playerid);
             SetSpawnInfo(playerid,0,pInfo[playerid][pSkin],-327.1662,1090.9407,19.7422,288.7162,0,0,0,0,0,0);
             SpawnPlayer(playerid);
          }
       }
    }
Reply
#10

The problem is already fixed. No need to reply to this thread anymore, Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)