Please, need help with a text
#1

I know, I've posted this before, but that had wrong script and no one could answer... so I maked a new one with my new script.

This time it only gives one error: "argument type mismatch (argument 2)"

Код:
public OnPlayerRequestClass(playerid, classid)
{
	SetPlayerPos(playerid, 1390.3442,-818.1929,74.2952);
    SetPlayerFacingAngle(playerid, 126.8305);
	SetPlayerCameraPos(playerid, 1386.3706,-821.1882,73.7814);
	SetPlayerCameraLookAt(playerid, 1390.3442,-818.1929,74.2952);
  	{
	 	if (classid == 0)
	 	{
				GameTextForPlayer(playerid, 3500, 6, "Civilian");
		}
	}
	return 1;
}
I maked this script, to show a text in the skin selection.

Thanks for helping me out with the error
Reply
#2

wrong order


GameTextForPlayer(playerid, 3500, 6, "Civilian");
should be in this order
GameTextForPlayer(playerid,const string[],time,style);
Reply
#3

nvm, someone helped him already.
Reply
#4

Quote:
Originally Posted by SilentHuntR
wrong order


GameTextForPlayer(playerid, 3500, 6, "Civilian");
should be in this order
GameTextForPlayer(playerid,const string[],time,style);
I know, but this is the first time I'm using "this" kind of script, so can you, or someone make an example that looks good?
I just get confused

Anyway... thanks for replying!
Reply
#5

Oh, I got it, thanks so mutch!

But is it possible to get one text on every skin, I mean, now I have civilian that shows on every civilian skin, then a gang skin pops up, I want the text to change and say maybe Gangs.
Reply
#6

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1390.3442,-818.1929,74.2952);
     SetPlayerFacingAngle(playerid, 126.8305);
    SetPlayerCameraPos(playerid, 1386.3706,-821.1882,73.7814);
    SetPlayerCameraLookAt(playerid, 1390.3442,-818.1929,74.2952);
    switch(classid)
    {
        case 0..44:
        {
            //GameTextForPlayer(......stuff....);
        }

    }
    return 1;
}
Reply
#7

Quote:
Originally Posted by SilentHuntR
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1390.3442,-818.1929,74.2952);
    SetPlayerFacingAngle(playerid, 126.8305);
    SetPlayerCameraPos(playerid, 1386.3706,-821.1882,73.7814);
    SetPlayerCameraLookAt(playerid, 1390.3442,-818.1929,74.2952);
    switch(classid)
    {
        case 0..44:
        {
            //GameTextForPlayer(......stuff....);
        }

    }
    return 1;
}
Do I have to type like

Код:
case 0: GameTextForPlayer(classid) //stuff
Reply
#8

no, you do it like you would, I just got lazy and didn't fill it in.
Reply
#9

Quote:
Originally Posted by SilentHuntR
no, you do it like you would, I just got lazy and didn't fill it in.
Hehe
What did you exactly type at GameTextForPlayer, I mean so I can add texts to "more" skins.
I want to give a name to every single skin I have added, so... :P

I have a nice style and stuff, so.
Reply
#10

pawn Код:
switch(classid)
    {
        case 0..3: //classes 0 through 3 (that's 4 total)
        {
            GameTextForPlayer(playerid,"Civilian",1500,3);
        }
        case 4: //class 4
        {
            GameTextForPlayer(playerid,"Gang Member",1500,3);
        }
        case 5..10: //classes 5 through 10
        {
            GameTextForPlayer(playerid,"COPZ!?!",1500,3);
        }

    }
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)