#1

Hello. I have this problem text GameTextForPlayer does not display at skin ID 1.

Код:
new Truckers[][1] = { {1}, {2}, {5} };

public OnGameModeInit()
{
    for(new i = 0; i <= sizeof(Truckers)-1; i++)
    {
	AddPlayerClass(Truckers[i][0], 0.0, 0.0, 0.0, 0.0, -1, -1, -1, -1, -1, -1);
    }
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    switch(classid)
    {
        case sizeof(Truckers)-1:
        {
            GameTextForPlayer(playerid, "Trucker", 3000, 4);
        }
    }
    return 1;
}
Reply
#2

Class IDs start from 0
https://sampwiki.blast.hk/wiki/AddPlayerClass
Reply
#3

Yes, but I want to do it for skins ID 1, 2 and 5. I do not know where the problem lies, but it's definitely the code.
Код:
new Truckers[][1] = { {1}, {2}, {5} };

for(new i = 0; i <= sizeof(Truckers) -1; i++)

AddPlayerClass(Truckers[i][0], 0.0, 0.0, 0.0, 0.0, -1, -1, -1, -1, -1, -1);

case sizeof(Truckers) -1:
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)