SA-MP Forums Archive
Problem with OnPlayerRequestClass.. - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Problem with OnPlayerRequestClass.. (/showthread.php?tid=196727)



Problem with OnPlayerRequestClass.. - The_Moddler - 06.12.2010

Oke, I have this:

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    switch(classid)
    {
        case 0..3:
        {
            GameTextForPlayer(playerid, "~w~Los Santos ~g~SAPD", 5000, 3);
            SetPlayerCameraPos(playerid, 1780.6676, -2462.4436, 15.5547);
            SetPlayerCameraLookAt(playerid, 1791.9713, -2470.5684, 16.9427);
        }
        case 4..7: GameTextForPlayer(playerid, "~w~San Fierro ~g~SAPD", 5000, 3);
        case 8..11: GameTextForPlayer(playerid, "~w~Las Venturas ~g~SAPD", 5000, 3);
        case 12..14: GameTextForPlayer(playerid, "~w~Las Venturas ~g~DRIFTER", 5000, 3);
    }
    PlayerPlaySound(playerid, 1185, 0, 0, 0);
    SetPlayerPos(playerid, 1792.3409, -2471.4387, 16.9700);
    SetPlayerFacingAngle(playerid, 57.9551);
    SetPlayerVirtualWorld(playerid, 0);
    return 1;
}
But it won't show any objects..how can I do to show them?

Thanks.


Re: Problem with OnPlayerRequestClass.. - The_Moddler - 07.12.2010

Bump 12 hours..


Re: Problem with OnPlayerRequestClass.. - rjjj - 07.12.2010

I already saw some Gamemodes that the player had to spawn to the objects and the cars appears to him.


Maybe the problem is not in your public OnPlayerRequestClass but in you Spawn Settings.


Your public OnPlayerRequestClass is normal.


I hope i have helped


Re: Problem with OnPlayerRequestClass.. - The_Moddler - 07.12.2010

Quote:
Originally Posted by rjjj
Посмотреть сообщение
I already saw some Gamemodes that the player had to spawn to the objects and the cars appears to him.


Maybe the problem is not in your public OnPlayerRequestClass but in you Spawn Settings.


Your public OnPlayerRequestClass is normal.


I hope i have helped
Spawn settings?

Dude, I'm asking why the objets don't show in OnPlayerRequestClass, and therefor how to do it.


Re: Problem with OnPlayerRequestClass.. - The_Gangstas - 07.12.2010

try using incognito's streamer for the objects then

Streamer_UpdateEx(playerid); onplayerrequestclass. i hope this helps.


Re: Problem with OnPlayerRequestClass.. - The_Moddler - 07.12.2010

Quote:
Originally Posted by The_Gangstas
Посмотреть сообщение
try using incognito's streamer for the objects then

Streamer_UpdateEx(playerid); onplayerrequestclass. i hope this helps.
I am using Incognito's streamer, I did try that also, but no way..


Re: Problem with OnPlayerRequestClass.. - The_Moddler - 08.12.2010

Bump 12 hours


Re: Problem with OnPlayerRequestClass.. - Toreno - 08.12.2010

Maybe... I am mistaking, but where did you exactly created an object on OnPlayerRequestClass,
If this is what you are talking about, because this code looks fine to me...


Re: Problem with OnPlayerRequestClass.. - HyperZ - 08.12.2010

Try this xD
Use this for skin choose island
pawn Код:
CreatePlayerObject(playerid, modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ);
pawn Код:
//skin choose island
new bool: SkinChooseIslandObjectsShown[MAX_PLAYERS];
new SpawnIslandObject1;
new SpawnIslandObject2;
new SpawnIslandObject3;
new SpawnIslandObject4;
new SpawnIslandObject5;
new SpawnIslandObject6;
new SpawnIslandObject7;
new SpawnIslandObject8;
new SpawnIslandObject9;
public OnPlayerRequestClass(playerid, classid)
{
    if(SkinChooseIslandObjectsShown[playerid] == false)
    {
        SkinChooseIslandObjectsShown[playerid] = true;
        SpawnIslandObject1 = CreatePlayerObject(playerid, modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ);
        SpawnIslandObject2 = CreatePlayerObject(playerid, modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ);
        SpawnIslandObject3 = CreatePlayerObject(playerid, modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ);
        SpawnIslandObject4 = CreatePlayerObject(playerid, modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ);
        SpawnIslandObject5 = CreatePlayerObject(playerid, modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ);
        SpawnIslandObject6 = CreatePlayerObject(playerid, modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ);
        SpawnIslandObject7 = CreatePlayerObject(playerid, modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ);
        SpawnIslandObject8 = CreatePlayerObject(playerid, modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ);
        SpawnIslandObject9 = CreatePlayerObject(playerid, modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ);
    }
    return 1;
}
Hope it'll works


Re: Problem with OnPlayerRequestClass.. - Mean - 08.12.2010

OnPlayerRequestClass...
CreateDynamicObject...


not GameModeInit then, elseways, idk what could be a problem