VIP COMMANDS
#1

hi im dee10 and i have a few commands for vip but i want to make it where only vips can use that command instead of anyone else please tell me how?!
Reply
#2

Use something in the command like


pawn Код:
if(VipPlayer[playerid] == 1)
Reply
#3

What he said. so make it like..

for example.

pawn Код:
if(!strcmp(cmdtext,"/bacon",true)) {
vip[playerid] == 1)
{
SendClientMessage(playerid,color,"mmmh tasty bacon for the vip!");
}
else
{
SendClientMessage(playerid,color,"No bacon for you");
}
return 1;}
Reply
#4

Quote:
Originally Posted by _Ч§hмf†ҐЧ™_
What he said. so make it like..

for example.

pawn Код:
if(!strcmp(cmdtext,"/bacon",true)) {
vip[playerid] == 1)
{
SendClientMessage(playerid,color,"mmmh tasty bacon for the vip!");
}
else
{
SendClientMessage(playerid,color,"No bacon for you");
}
return 1;}
that's wrong

I would do something like
pawn Код:
// this is ZCMD cause it's how I'm used to writing cmds

cmd(donator, playerid, parmas[])
{
if(GetPVarInt(playerid, "Donator") == 0) return SendClientMessage(playerid, color, "You aint a donator.");
if(GetPVarInt(playerid, "Donator") == 1)return SendClientMessage(playerid, color, "You are a donator.");
return 1;
}

// this is just a little example of how I would do it.
Reply
#5

Yeah i guess you could do it that way. but then you would have to set the Pvar on setting donator status right?
Reply
#6

Quote:
Originally Posted by _Ч§hмf†ҐЧ™_
Yeah i guess you could do it that way. but then you would have to set the Pvar on setting donator status right?
just make it save and set when a player logs in.
Reply
#7

Quote:
Originally Posted by _Ч§hмf†ҐЧ™_
What he said. so make it like..

for example.

pawn Код:
if(!strcmp(cmdtext,"/bacon",true)) {
vip[playerid] == 1)
{
SendClientMessage(playerid,color,"mmmh tasty bacon for the vip!");
}
else
{
SendClientMessage(playerid,color,"No bacon for you");
}
return 1;}
This is much easier than Shady91's way.
Reply
#8

Quote:
Originally Posted by NiiRV4N4
Quote:
Originally Posted by _Ч§hмf†ҐЧ™_
What he said. so make it like..

for example.

pawn Код:
if(!strcmp(cmdtext,"/bacon",true)) {
vip[playerid] == 1)
{
SendClientMessage(playerid,color,"mmmh tasty bacon for the vip!");
}
else
{
SendClientMessage(playerid,color,"No bacon for you");
}
return 1;}
This is much easier than Shady91's way.
No it's not. Plus that code look's wrong.

pawn Код:
if(!strcmp(cmdtext,"/bacon",true))
{
if(vip[playerid] == 1)
{
SendClientMessage(playerid,color,"mmmh tasty bacon for the vip!");
}
else
{
SendClientMessage(playerid,color,"No bacon for you");
}
return 1;
}
I would recommend Pvar's it's allot better.
Reply
#9

pawn Код:
if(!strcmp(cmdtext,"/cmd",true)) {
if (IsPlayerVip[playerid] == 1) { //Change the variable IsPlayerVip to your own
//If player is VIP, all functions here happens.
}

}
return 1;
Reply
#10

Quote:
Originally Posted by Jakku
pawn Код:
if(!strcmp(cmdtext,"/cmd",true)) {
if (IsPlayerVip[playerid] == 1) { //Change the variable IsPlayerVip to your own
//If player is VIP, all functions here happens.
}

}
return 1;
Why did you post that, like he don't have enough example's?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)