setplayerinfo +rep
#1

hi guys,

i want to make premium member script and i have problem with this.. i will make it with score and if the player have for exempel >1000 score it will make players info to premium

public OnPlayerRequestSpawn(playerid)
{
if(GetPlayerScore(playerid) > 10000
and i dont know what i can put after that to make the player premium.. thanks
Reply
#2

What do you mean? You want to make it so if a player reaches 10000 score a premium variable is set?

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
     if(GetPlayerScore(playerid) > 10000 && !playerPremium[playerid]) {
            playerPremium[playerid] = 1;
            SendClientMessage(playerid, -1, "You have reached 10000 score and have reached premium.");
            return 1;
     }
}
Reply
#3

(19347) : error 028: invalid subscript (not an array or too many subscripts): "SemiPro"

Quote:

public OnPlayerRequestSpawn(playerid)
{
if(GetPlayerScore(playerid) > 10000 && !SemiPro[playerid]){
SemiPro[playerid] = 1;
SendClientMessage(playerid, -1, "Tebrikler Semi Pro ьyeliрine terfi etdin!");}
if(GetPlayerScore(playerid) > 20000 && !Premium[playerid]) {
Premium[playerid] = 1;
SendClientMessage(playerid, -1, "Tebrikler Premium ьyeliрine terfi etdin!");}
spawnMute[playerid] = false;
if(IsPlayerNPC(playerid))return 1; etc

Reply
#4

up...
Reply
#5

Код:
#include <a_samp>
public OnPlayerRequestSpawn(playerid)
{
	if(GetPlayerScore(playerid) >= 10000 && SemiPro[playerid] == 0)
	{
		SemiPro[playerid] = 1;
		SendClientMessage(playerid, -1, "Tebrikler Semi Pro ьyeli?ine terfi etdin!");
	}
	if(GetPlayerScore(playerid) >= 20000 && Premium[playerid] == 0)
	{
		Premium[playerid] = 1;
		SendClientMessage(playerid, -1, "Tebrikler Premium ьyeli?ine terfi etdin!");}
		spawnMute[playerid] = false;
	}
	return 1;
}
Reply
#6

same problem..
Reply
#7

Did you defined SemiPro at top of your script?
Reply
#8

yes i did
Reply
#9

Quote:
Originally Posted by sirvanec
Посмотреть сообщение
yes i did
ok, was it same as:
PHP код:
SemiPro[MAX_PLAYERS]; 
Reply
#10

it looks like this

enum PlayerData
{
sqlid,
kullaniciadi[24],
sifre[35],
money,
Deaths,
Kills,
Level,
Animator,
SemiPro,
Premium,
score,
LoggedIn,
LastOn[30],
RegisteredDate[30],
TimesOnServer,
banned,
Registered,
Jailed,
JailTime,
language,
oyundami,
savaskazandi,
yariskazandi,
etkkazandi,
evsayisi,
ceteid,
ceterutbe[20],
ceterutbeid,
IP[30],
Floatinfox,
Floatinfoy,
Floatinfoz,
pinfointerior,
pinfoworld,
onlinet,
vayar,
mayar,
fallkazandi,
derbykazandi,
otogiris,
yetkiname[25],
skinplayer,
rengim,
shootskil,
};

and if i put that on the top then i got problem that says this is already defined..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)