Only spawn when you have level 6 HELP
#1

Hi, I need a script that you can only spawn ( in this case admin class ) if you have level 6.

Help
Reply
#2

Quote:
Originally Posted by Fantje
Посмотреть сообщение
Hi, I need a script that you can only spawn ( in this case admin class ) if you have level 6.

Help
Check if he has level 6 and if not then send message like "You have to be level 6".
Reply
#3

Код:
				if(PlayerInfo[playerid][pLevel] > 6)
				{
                                        SafeSetPlayerPos(playerid, Float:x, Float:y, Float:z);
				}
                                else
                                {
                                        SendClientMessage(playerid, COLOR_GRAD1, "You must be level 6 to spawn");
                                        return 1;
                                }
Reply
#4

I need the script for if he hasn't level 6 you can't spawn
Reply
#5

Thanks
Reply
#6

ERRORS
Reply
#7

Quote:
Originally Posted by Fantje
Посмотреть сообщение
ERRORS
Код:
	if(PlayerInfo[playerid][pLevel] > 6)
				{
                                        SafeSetPlayerPos(playerid, Float:x, Float:y, Float:z);
				}
                                else
                                {
                                        SendClientMessage(playerid, COLOR_GRAD1, "You must be level 6 to spawn");
                                        return 1;
                                }
That is example..
SafeSetPlayerPos must be first defined to this work..
Try put SetPlayerPos it will work
Reply
#8

PHP код:
C:\Users\Administrator\Desktop\SvT Mike\gamemodes\C_VS_T_4.1.pwn(1372) : error 017undefined symbol "PlayerInfo"
C:\Users\Administrator\Desktop\SvT Mike\gamemodes\C_VS_T_4.1.pwn(1372) : warning 215expression has no effect
C
:\Users\Administrator\Desktop\SvT Mike\gamemodes\C_VS_T_4.1.pwn(1372) : error 001expected token";"but found "]"
C:\Users\Administrator\Desktop\SvT Mike\gamemodes\C_VS_T_4.1.pwn(1372) : error 029invalid expressionassumed zero
C
:\Users\Administrator\Desktop\SvT Mike\gamemodes\C_VS_T_4.1.pwn(1372) : fatal error 107too many error messages on one line 
My class lines:

PHP код:
public OnPlayerRequestClass(playeridclassid){
   
SetSkinToMeSkin[playerid]=500;
   new 
skin=GetPlayerSkin(playerid);
   switch(
skin){
      case 
125,124:{
        
SetPlayerPos(playerid, -382.5999,2206.6169,42.4236);
        
SetPlayerFacingAngle(playerid,280.0);
        if(
Options[TextLanguage]==2)GameTextForPlayer(playerid,"~r~TERRORISTS",2000,3);
        
SetPlayerColor(playerid,COLOR_LIGHTRED);SKIN[playerid]=skin;
        
SetPlayerCameraPos(playerid, -379.5999,2206.6169,42.4236);
        
SetPlayerCameraLookAt(playerid, -382.5999,2206.6169,42.4236);}
      case 
287:{
        
SetPlayerPos(playerid212.7791,1919.7570,17.6406);
        
SetPlayerFacingAngle(playerid,180.0);
        if(
Options[TextLanguage]==2)GameTextForPlayer(playerid,"~b~SWAT",2000,3);
        
SetPlayerColor(playerid,COLOR_BLUE);SKIN[playerid]=skin;
        
SetPlayerCameraPos(playerid212.7791,1916.7570,17.6406);
        
SetPlayerCameraLookAt(playerid212.7791,1919.7570,17.6406);}
      case 
285:{
        
SetPlayerPos(playerid212.7791,1919.7570,17.6406);
        
SetPlayerFacingAngle(playerid,180.0);
        if(
Options[TextLanguage]==2)GameTextForPlayer(playerid,"~b~DONATOR",2000,3);
        
SetPlayerColor(playerid,COLOR_BLUE);SKIN[playerid]=skin;
        
SetPlayerCameraPos(playerid212.7791,1916.7570,17.6406);
        
SetPlayerCameraLookAt(playerid212.7791,1919.7570,17.6406);}}
   return 
1;} 
Reply
#9

Do you have variable of player level,if you have it send me because i don't know how you are defined it.
Reply
#10

I used this:

PHP код:
if(PlayerInfo[playerid][pLevel] > 6)
                {
                                        
SafeSetPlayerPos(playeridFloat:xFloat:yFloat:z);
                }
                                else
                                {
                                        
SendClientMessage(playeridCOLOR_GRAD1"You must be level 6 to spawn");
                                        return 
1;
                                } 
I don't have the variable I think... I am noob so I don't know
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)