Posts: 617
Threads: 129
Joined: Feb 2014
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(playerid, red, "Premium Accounts","GAZA UTES");
if(pInfo[playerid][VIP] < 1) return SendClientMessage(playerid,-1,"You are not a Premium Member..");
return 0;
}
}
Posts: 617
Threads: 129
Joined: Feb 2014
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(playerid, red, "Premium Accounts","GAZA UTES");
return 0;
}
}
|
Well even before you had suggested this , i did that already but it didnt work..
Posts: 617
Threads: 129
Joined: Feb 2014
Quote:
Originally Posted by ISmokezU
PHP код:
new g_Classid[MAX_PLAYERS] = {-1, ...};
public OnPlayerRequestClass(playerid, classid) {
g_Classid[playerid] = classid;
return true;
public OnPlayerRequestSpawn(playerid) {
if((g_Classid[playerid] == 28 || g_Classid[playerid] == 29) && pInfo[playerid][VIP] < 1) {
ShowClassTextdraw(playerid, red, "Premium Accounts","GAZA UTES");
return;
}
}
return true;
|
Please explain the coding you have posted , cause i dont think you understand what i needed
Posts: 542
Threads: 14
Joined: Aug 2016
Reputation:
0
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?
Posts: 617
Threads: 129
Joined: Feb 2014
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