Text at choosing skin
#1


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


Reply
#2

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;
}
Reply
#3

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
Reply
#4

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...
Reply
#5

YES!
thats it

thank u !!!!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)