Hali.
Szeretném összehasonlítani a skineket, és ha az egyikel egyezik akkor ide spawnolja, ha nem akkor oda.
Nos, ha ezt a kódot írom bele akkor összeomlik a pawno.
new playerskin = GetPlayerSkin(playerid);
Így meg nem különbözteti meg, és ugyan arra a helyre spawnol.
public OnPlayerSpawn(playerid)
{
if ((GetPlayerSkin(playerid)) == 181 || 200)
{
if(map == 1)
{
SetPlayerPos(playerid, -1432.7466,-1509.9908,111.6719);
SetPlayerPos(playerid, 2336.3113,-1064.1077,1049.0234);
SetPlayerPos(playerid, -1446.5127,-1592.3442,101.7578);
}
else if(map == 2)
{
SetPlayerPos(playerid, -291.7393,2643.7925,63.2648);
SetPlayerPos(playerid, -282.3298,2589.1038,63.5703);
SetPlayerPos(playerid, -257.4696,2588.7688,63.5703);
}
else if(map == 3)
{
SetPlayerPos(playerid, 2564.0222,-2046.0134,4.9602);
SetPlayerPos(playerid, 2587.9734,-2085.8032,2.7364);
SetPlayerPos(playerid, 2591.8630,-2039.5071,3.8594);
}
else if(map == 4)
{
//SetPlayerPos(playerid,
//SetPlayerPos(playerid,
//SetPlayerPos(playerid,
}
}
else if((GetPlayerSkin(playerid)) == 296 || 299 || 294 || 293 || 187)
{
if(map == 1)
{
SetPlayerPos(playerid, -1430.0305,-1477.1351,101.6719);
SetPlayerPos(playerid, -1417.7583,-1476.3458,101.6719);
SetPlayerPos(playerid, -1421.1860,-1503.1416,105.0391);
}
else if(map == 2)
{
SetPlayerPos(playerid, 2580.5854,-1988.5404,6.5567);
SetPlayerPos(playerid, 2599.1228,-1964.2921,7.0634);
SetPlayerPos(playerid, 2572.6619,-1946.7546,3.8594);
}
else if(map == 3)
{
SetPlayerPos(playerid, -145.3409,2635.9678,63.7025);
SetPlayerPos(playerid, -169.4207,2707.2490,62.5306);
SetPlayerPos(playerid, -158.4709,2737.3381,62.1171);
}
else if(map == 4)
{
//SetPlayerPos(playerid,
//SetPlayerPos(playerid,
//SetPlayerPos(playerid,
}
}
return 1;
}
Valaki el tudná mondani hogy mi a hiba, és egy kódot tudna adni, amivel a három pozíció közül, véletlen spawnolna az egyikre? Elõre is köszönöm!