14.05.2012, 08:34
I made Admin Class/VIP Class the problem is
the game text/client message only appears for class id 23
i make sure that i'm Admin Level 5 & VIP Level 2 What is the problem in my code?
but it seems like OnPlayerRequestSpawn is working fine when i use other admin class/vip class it shows me
the game text/client message only appears for class id 23
i make sure that i'm Admin Level 5 & VIP Level 2 What is the problem in my code?
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 2282.3689,-1248.0156,24.0000);
SetPlayerFacingAngle(playerid, 180.6267);
SetPlayerCameraPos(playerid, 2282.2136,-1252.6395,24.0000);
SetPlayerCameraLookAt(playerid, 2282.3689,-1248.0156,24.0000);
if(PlaySong[playerid] == 0)
{
PlaySong[playerid] = 1;
PlayAudioStreamForPlayer(playerid, "http://k002.kiwi6.com/hotlink/04gp2006f8/s_club_7_you_re_my_number_one.mp3");
}
else if(classid == 22 || classid == 24)
{
pData[playerid][PrivateSkin] = 0;
}
else if(classid == 23)
{
if(pData[playerid][VIP] < 1)
{
SendClientMessage(playerid, COLOR_RED, "*** For VIP only! ***");
GameTextForPlayer(playerid, "~r~For VIP only!", 3000, 4);
}
else if(pData[playerid][VIP] > 1)
{
SendClientMessage(playerid, COLOR_LIGHTGREEN, "*** You are allowed to use this skin! ***");
GameTextForPlayer(playerid, "~g~You are allowed to use this skin!", 4000, 4);
}
pData[playerid][PrivateSkin] = 1;
}
else if(classid == 28 || classid == 30 || classid == 55 || classid == 57)
{
pData[playerid][PrivateSkin] = 0;
}
else if(classid == 29 || classid == 56)
{
if(pData[playerid][Admin] < 5)
{
SendClientMessage(playerid, COLOR_RED, "*** For Clan Owner/Co-Owner only! ***");
GameTextForPlayer(playerid, "~r~For Clan Owner/Co-Owner only!", 3000, 4);
}
else if(pData[playerid][Admin] > 5)
{
SendClientMessage(playerid, COLOR_LIGHTGREEN, "*** You are allowed to use this skin! ***");
GameTextForPlayer(playerid, "~g~You are allowed to use this skin!", 4000, 4);
}
pData[playerid][PrivateSkin] = 2;
}
else if(classid == 207 || classid == 209 || classid == 216 || classid == 218)
{
pData[playerid][PrivateSkin] = 0;
}
else if(classid == 208 || classid == 217)
{
if(pData[playerid][Admin] < 1)
{
SendClientMessage(playerid, COLOR_RED, "*** For Server Administrators only! ***");
GameTextForPlayer(playerid, "~r~For Server Administrators only!", 3000, 4);
}
else if(pData[playerid][Admin] > 1)
{
SendClientMessage(playerid, COLOR_LIGHTGREEN, "*** You are allowed to use this skin! ***");
GameTextForPlayer(playerid, "~g~You are allowed to use this skin!", 4000, 4);
}
pData[playerid][PrivateSkin] = 3;
}
return 1;
}
Код:
*** You use your Private Admin/VIP class ***