SA-MP Forums Archive
So again problem which I cant think out. (y_classes, y_groups)! - 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)
+--- Thread: So again problem which I cant think out. (y_classes, y_groups)! (/showthread.php?tid=409324)



So again problem which I cant think out. (y_classes, y_groups)! - Scrillex - 21.01.2013

PHP код:
public OnPlayerSpawn(playerid)
{
   if(
g_pClassID[playerid] == || g_pClassID[playerid] == || g_pClassID[playerid] == || g_pClassID[playerid] == 3)
   {
        
Group_SetPlayer(gCripsplayeridtrue);
        
SetPlayerInterior(playerid3);
        
SetPlayerPos(playerid,2496.3914,-1709.5240,1014.7422);
    }
    else if(
g_pClassID[playerid] == 20 || g_pClassID[playerid] == 21 || g_pClassID[playerid] == 22 ||  g_pClassID[playerid] == 23)
    {
        
Group_SetPlayer(gIdlewoodplayeridtrue);
        
SetPlayerInterior(playerid5);
        
SetPlayerPos(playerid,319.8876,1124.1194,1084.3733);
    } 
So my first spawn piont is in CJ house the problem is... When I chose second group it spawns in same localation.. How it's possible to set to second spawn?


Re: So again problem which I cant think out. (y_classes, y_groups)! - Scrillex - 21.01.2013

Someone? Please maybe someone knows the answer!


AW: Re: So again problem which I cant think out. (y_classes, y_groups)! - Harry :) - 21.01.2013

Quote:
Originally Posted by Scrillex
Посмотреть сообщение
Someone? Please maybe someone knows the answer!
well, if it's just on the game session where he should spawn on antoher location you could add:

somewhere on top of the script:

PHP код:
new spawncount[MAX_PLAYERS]; 
PHP код:
spawncount[playerid]++;
if(
spawncount[playerid] == 1)
{
//CJs House
}
else if(
spawncount[playerid] == 2)
{
//next spawn
}
else if(
spawncount[playerid] == 3)
{
//reset spawn to CJs? spawncount[playerid] = 1;




Re: So again problem which I cant think out. (y_classes, y_groups)! - Scrillex - 21.01.2013

You didn't get it ...

PHP код:
else if(g_pClassID[playerid] == 20 || g_pClassID[playerid] == 21 || g_pClassID[playerid] == 22 ||  g_pClassID[playerid] == 23
(thouse are skin ids not player ids.) I don't need random spawning I need current localotions. Because I cant spawn Ballas in CJ house.. It's absord.. But anyway thank you for your time and post


AW: Re: So again problem which I cant think out. (y_classes, y_groups)! - Harry :) - 21.01.2013

Quote:
Originally Posted by Scrillex
Посмотреть сообщение
You didn't get it ...

PHP код:
else if(g_pClassID[playerid] == 20 || g_pClassID[playerid] == 21 || g_pClassID[playerid] == 22 ||  g_pClassID[playerid] == 23
(thouse are skin ids not player ids.) I don't need random spawning I need current localotions. Because I cant spawn Ballas in CJ house.. It's absord.. But anyway thank you for your time and post
oh, my fault


Re: AW: Re: So again problem which I cant think out. (y_classes, y_groups)! - Scrillex - 21.01.2013

Quote:
Originally Posted by Harry :)
Посмотреть сообщение
oh, my fault
All okay mate anyway +rep!