PDA

View Full Version : Vip or Admin Skins help


Farshid1994
28/05/2013, 09:18 PM
i need to set a skin Only for VIPs on Player Class Selection using LuxAdmin , can i have some tips plz ? at the end for the error that will be shown to player , i should use SendClientMessage or something that pops up in a middle of screen

DobbysGamertag
28/05/2013, 09:33 PM
public OnPlayerRequestSpawn(playerid)
{
if(adminvariable, < level)
if(GetPlayerSkin(playerid,SKINHERE);
return SendClientMessage(playerid,-1,"Skin for admin use only");
ForceClassSelection(playerid);
return 1;
}

There might be a better way to do it. But i'd do it this way :) I'll go test it now

Farshid1994
28/05/2013, 10:56 PM
public OnPlayerRequestSpawn(playerid)
{
if(adminvariable, < level)
if(GetPlayerSkin(playerid,SKINHERE);
return SendClientMessage(playerid,-1,"Skin for admin use only");
ForceClassSelection(playerid);
return 1;
}

There might be a better way to do it. But i'd do it this way :) I'll go test it now
how to do it For LuxAdmin ?
when i change adminvariable into IsPlayerVipMember it needs an Else return value But i dont know what to do with it
Samp 3x

Farshid1994
29/05/2013, 07:09 AM
i Still have problem setting my own skin for VIP Guys ... somebody help

DobbysGamertag
29/05/2013, 07:19 AM
Admin check for LuxAdmin itself

if(AccInfo[playerid][Level] >= 1)


If you're using it in another script:


#include ladmin

//heres the Admin check
public OnPlayerRequestSpawn(playerid)
{
if (IsPlayerLuxAdminLevel(playerid,0))
if(GetPlayerSkin(playerid,SKINHERE); return SendClientMessage(playerid,-1,"Skin for admin use only");
return 0;
}



//or if you're using VIP

if(IsPlayerVipType(playerid,1))


Replace each one accordingly
Not tested, but if it doesnt work, post here.

Farshid1994
29/05/2013, 07:35 AM
public OnPlayerRequestSpawn(playerid)
{
if(IsPlayerVipMember(playerid)) {
if(GetPlayerSkin(playerid,280);
return SendClientMessage(playerid,-1,"Skin for VIP use only");
return 0;
}
}

This is how i do it but i get errors

E:\Server\Main Siraf\Main Siraf\gamemodes\test.pwn(2333) : warning 202: number of arguments does not match definition
E:\Server\Main Siraf\Main Siraf\gamemodes\test.pwn(2333) : error 001: expected token: ")", but found ";"
E:\Server\Main Siraf\Main Siraf\gamemodes\test.pwn(2333) : error 036: empty statement
E:\Server\Main Siraf\Main Siraf\gamemodes\test.pwn(2335) : warning 225: unreachable code
E:\Server\Main Siraf\Main Siraf\gamemodes\test.pwn(2335) : warning 217: loose indentation
E:\Server\Main Siraf\Main Siraf\gamemodes\test.pwn(2337) : warning 209: function "OnPlayerRequestSpawn" should return a value
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.


i'm not familiar with these kind of VIP or Admin Use ...i use IsPlayerVipMember Then at the end i else return with a message ..... but this one is confusing

mahdi499
29/05/2013, 07:43 AM
public OnPlayerRequestSpawn(playerid)
{
if(IsPlayerVipMember(playerid)) {
if(GetPlayerSkin(playerid,280)
return SendClientMessage(playerid,-1,"Skin for VIP use only");
return 0;
}
}

Never Put Semi colons after if statements

Farshid1994
29/05/2013, 11:37 AM
if(GetPlayerSkin(playerid,SKINHERE);


After GetPlayerSkin(playrrid ...... You Can use anything els except " ) "
like this
if(GetPlayerSkin(Playerid)
And you Need 1 More " ) " like this
if(GetPlayerSkin(Playerid));
but when i do this , i normaly do not give the script a skin number so if we use it for admin and omit SKINID after PlayerID, only admins can Spawn ( no matter what skin ) , for god sake i'm completely confused and need your help
1_where the hell do i set SkinID
2_i need it For my Vip Users not Admins .......Using LuxAdmin
all i want is My Case 6 Skin which is ID 280 Only For VIPs and Admins ...That's all , Plz help