#1

Hello i am making CIA but how i can make if that player who want to chose CIA skin and he dont have premison for choose that skin it will send him messagew that he cant choose this skin ... and sry for my bad english (premision XD)

ty for any help
Reply
#2

use Global variable

Код:
new CIA;
Under OnGameModeinit

for e.g CIA skin =
Код:
CIA=AddPlayerClass(265,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,0,0);
under OnPlayerRequestSpawn
Код:
if(classid == CIA) return SendClientMessage(playerid, COLOR_RED, "you can choose this skin.");
Reply
#3

Код:
public OnPlayerRequestSpawn(playerid)
{
  if (udb_UserInt(PlayerName(playerid), "ciamember") >= 0)
  {
  	if(classid == CIA) return SendClientMessage(playerid, 0xFF9900AA, "You Are Not Cia Member,You Can't Choose This Skin!"); - error line
		return 1;
	}
	return 1;
}
it says error undefined symbol classid...
Reply
#4

so any help ?
Reply
#5

OnPlayerRequestSpawn-callback doesn't have a classid param, but OnPlayerRequestClass-callback does.
Reply
#6

but saif say i can put under on player request spawn .... but i think on OnPlayerRequestClass this code wont work,i just want to make if player want to spawn with some CIA skins and he dont have premision for that it will send message that he must chose other skin or something like that ...
Reply
#7

Quote:
Originally Posted by Lajko1
but saif say i can put under on player request spawn .... but i think on OnPlayerRequestClass this code wont work,i just want to make if player want to spawn with some CIA skins and he dont have premision for that it will send message that he must chose other skin or something like that ...
yeah sorry i forgotten Don Corelli is right .It will work in OnPlayerRequestClass
Reply
#8

wont work,ty for try but i want , if player want to spawn with this skin it will say this error message... now when i chosing classes and i come to CIA classes it write this message , i want when player press LSHIFT and want to spawn with CIA class it will send him this message
Reply
#9

Код:
if (udb_UserInt(PlayerName(playerid), "ciamember") >= 0)
  {
  	if(classid == CIA) return SendClientMessage(playerid, 0xFF9900AA, "You Are Not Cia Member,You Can't Choose This Skin!"); - error line
		else
if(classid == CIA && CIAJob) 
return 1;
}
untested and CIAjob is your job which you want to add it as CIA
Reply
#10

ty for try but still not good, listen! Now When i am chossing skins < or > and i come to CIA SKINS it write message ''bla bla ...'' but i want if i am chosing skins it wont nothing happen if i come to CIA skins,but if player want to SPAWN WITH CIA SKIN will send him error message i hope u understand now

ty for help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)