Why dosent spawn on corectly position?
#1

I have this code under OnPlayerSpawn

pawn Код:
for(new i; i<MAX_HOUSES; i++)
     {
       if(strcmp(Ime, HouseInfo[i][HouseOwner]))
       {
         SetPlayerPos(playerid, HouseInfo[i][TeleX], HouseInfo[i][TeleY], HouseInfo[i][TeleZ]);
         SetPlayerInterior(playerid, HouseInfo[i][Interior]);
         InHouse[playerid] = i;
         SetPlayerVirtualWorld(playerid, HouseInfo[i][Virtual]);
       }
     }
and when i spawn in house my pos get set on this

Reply
#2

pawn Код:
for(new i; i<MAX_HOUSES; i++)
     {
       if(!strcmp(Ime, HouseInfo[i][HouseOwner]))
       {
         SetPlayerPos(playerid, HouseInfo[i][TeleX], HouseInfo[i][TeleY], HouseInfo[i][TeleZ]);
         SetPlayerInterior(playerid, HouseInfo[i][Interior]);
         InHouse[playerid] = i;
         SetPlayerVirtualWorld(playerid, HouseInfo[i][Virtual]);
       }
     }
Use '!' in strcmp Whats Ime btw?
Reply
#3

Ime = playername

btw: now i get this on player spawn

Reply
#4

Looks lke you co-ordinates are messed up make a command that does the same as the pickup/checkpoint and see if thats the same result. If it is look at your CreateHouse function that will be where the problem is. (or you just have co-ords messed up)
Reply
#5

how i can fix co-ordinates if is a problem in that
Reply
#6

Well if you have our co-ords messed up, just go and save some more make sure your setting to the correct interior too.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)