SA-MP Forums Archive
Text at choosing skin - 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: Text at choosing skin (/showthread.php?tid=137258)



Text at choosing skin - wesone - 28.03.2010


i want a text wich appears by the class selection but only for a few skins


Код:
SetPlayerTeamFromClass(playerid, classid);
	SetupPlayerForClassSelection(playerid);
	gPlayerClass[playerid] = classid;
	switch (classid) {
	   case 10:
		   {
		     GameTextForPlayer(playerid, "~y~w",5000,3);
		   }
	   case 11:
	       {
		     GameTextForPlayer(playerid, "~y~l",5000,3);
		   }
	   case 12:
		   {
	         GameTextForPlayer(playerid, "~y~n",5000,3);
		   }
	   case 13:
		   {
             GameTextForPlayer(playerid, "~y~k",5000,3);
		   }
	   case 14:
		   {
      	     GameTextForPlayer(playerid, "~y~n",5000,3);
		   }
	   case 15:
		   {
             GameTextForPlayer(playerid, "~y~p",5000,3);
		   }
	   }
  return 1;
}

with this code i get 6 errors^^

but i never dealed with "OnPlayerRequestClass" before
and i don't know how to fix it





Re: Text at choosing skin - VirSpectorX - 28.03.2010

Try this:

pawn Код:
onPlayerRequestClass(playerid, classid)
{
switch (classid) {
       case 10:
           {
               GameTextForPlayer(playerid, "~y~w",5000,3);
           }
       case 11:
           {
               GameTextForPlayer(playerid, "~y~l",5000,3);
           }
       case 12:
           {
               GameTextForPlayer(playerid, "~y~n",5000,3);
           }
       case 13:
           {
               GameTextForPlayer(playerid, "~y~k",5000,3);
           }
       case 14:
           {
               GameTextForPlayer(playerid, "~y~n",5000,3);
           }
       case 15:
           {
               GameTextForPlayer(playerid, "~y~p",5000,3);
           }
       }
  return 1;
}



Re: Text at choosing skin - wesone - 28.03.2010

thank u for the answer but i get 8 errors

Код:
.pwn(1113) : error 010: invalid function or declaration
.pwn(1114) : error 010: invalid function or declaration
.pwn(1118) : error 010: invalid function or declaration
.pwn(1122) : error 010: invalid function or declaration
.pwn(1126) : error 010: invalid function or declaration
.pwn(1130) : error 010: invalid function or declaration
.pwn(1134) : error 010: invalid function or declaration
.pwn(1139) : error 010: invalid function or declaration



Re: Text at choosing skin - VirSpectorX - 28.03.2010

ok, gotcha!

Try this script (Tested, no errors!)

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    if(classid == 1){
      GameTextForPlayer(playerid, "~w~Police", 1000, 5);
    }
    else if(classid == 2){
      GameTextForPlayer(playerid, "~r~Assassin", 1000, 5);
    }
    return 1;
}
You can simply add things on it...


Re: Text at choosing skin - wesone - 28.03.2010

YES!
thats it

thank u !!!!