SA-MP Forums Archive
Restricted skins - 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)
+--- Thread: Restricted skins (/showthread.php?tid=632557)



Restricted skins - 1fret - 16.04.2017

Ok i need to make a coding which restricts players that are NOT vips from spawing with the skin from under onplayerrequestclass my coding hasnt been working could someone help out real quick


PHP код:
        case 28 .. 29:
        {
            
gTeam[playerid] = VIPS;
            
ShowClassTextdraw(playeridred"Premium Accounts","GAZA UTES");
            if(
pInfo[playerid][VIP] < 1) return SendClientMessage(playerid,-1,"You are not a Premium Member..");
            return 
0;
          }
    } 



Re: Restricted skins - AjaxM - 16.04.2017

You should check whether he is a VIP or not before setting his team to VIP.

PHP код:
case 28 .. 29
           { 
            if(
pInfo[playerid][VIP] < 1) return SendClientMessage(playerid,-1,"You are not a Premium Member.."); 
            
gTeam[playerid] = VIPS
            
ShowClassTextdraw(playeridred"Premium Accounts","GAZA UTES"); 
            return 
0
          } 
    } 



Re: Restricted skins - 1fret - 16.04.2017

Quote:
Originally Posted by AjaxM
Посмотреть сообщение
You should check whether he is a VIP or not before setting his team to VIP.

PHP код:
case 28 .. 29
           { 
            if(
pInfo[playerid][VIP] < 1) return SendClientMessage(playerid,-1,"You are not a Premium Member.."); 
            
gTeam[playerid] = VIPS
            
ShowClassTextdraw(playeridred"Premium Accounts","GAZA UTES"); 
            return 
0
          } 
    } 
Well even before you had suggested this , i did that already but it didnt work..


Re: Restricted skins - ISmokezU - 16.04.2017

PHP код:
new g_Classid[MAX_PLAYERS] = {-1, ...};
public 
OnPlayerRequestClass(playeridclassid) {
         
g_Classid[playerid] = classid;
         return 
true;
public 
OnPlayerRequestSpawn(playerid) {
       if((
g_Classid[playerid] == 28 || g_Classid[playerid] == 29) && pInfo[playerid][VIP] < 1) {
       
ShowClassTextdraw(playeridred"Premium Accounts","GAZA UTES"); 
       return;
       }
   }
   return 
true



Re: Restricted skins - 1fret - 16.04.2017

Quote:
Originally Posted by ISmokezU
Посмотреть сообщение
PHP код:
new g_Classid[MAX_PLAYERS] = {-1, ...};
public 
OnPlayerRequestClass(playeridclassid) {
         
g_Classid[playerid] = classid;
         return 
true;
public 
OnPlayerRequestSpawn(playerid) {
       if((
g_Classid[playerid] == 28 || g_Classid[playerid] == 29) && pInfo[playerid][VIP] < 1) {
       
ShowClassTextdraw(playeridred"Premium Accounts","GAZA UTES"); 
       return;
       }
   }
   return 
true
Please explain the coding you have posted , cause i dont think you understand what i needed


Re: Restricted skins - ISmokezU - 16.04.2017

What you want, You cannot use requesting class for that you have to use requesting spawn what i did is check for your classid 28 & 29 check if the playerid VIP level is below one and prevent them from spawning, Isn't that you wanted?


Re: Restricted skins - 1fret - 16.04.2017

Quote:
Originally Posted by ISmokezU
Посмотреть сообщение
What you want, You cannot use requesting class for that you have to use requesting spawn what i did is check for your classid 28 & 29 check if the playerid VIP level is below one and prevent them from spawning, Isn't that you wanted?
Mhmm... But i already made the coding what i wanted , but thanks for the response