Help with Command
#1

Hello guys!
I'm wanna put that command to only who has the DonateRank up of 3 use!
Can someone help me?
The Command:

Quote:

if (strcmp(cmd, "/comprarv", true) ==0 )
{
if(!IsPlayerInAnyVehicle(playerid)){return 1;}
if(GetCreatorID(vehicleid)!=0)
{
if (strmatch(VehicleSystem[GetCreatorID(vehicleid)][owner],Spielername(playerid))){SendClientMessage(playeri d,WHITE," Dieses Auto gehoert dir schon!");return 1;}
if (strmatch(VehicleSystem[GetCreatorID(vehicleid)][owner],"dealercar"))
{
if(VehicleSystem[GetCreatorID(vehicleid)][preis] < GetPlayerMoney(playerid))
{
strmid(VehicleSystem[GetCreatorID(vehicleid)][owner],Spielername(playerid),0,128,12;
GivePlayerMoney(playerid,-VehicleSystem[GetCreatorID(vehicleid)][preis]);
SendClientMessage(playerid,YELLOW," Se divirta com seu novo carro!");
TogglePlayerControllable(playerid,1);
SaveTool();
}
else
{
SendClientMessage(playerid,WHITE,"Vocк precisa de mais dinheiro!");
}
}
else
{
SendClientMessage(playerid,WHITE,"Esse veiculo nгo estб a venda!");
}
}
else
{
SendClientMessage(playerid,WHITE,"Nгo й um carro compravel!");
}
return 1;
}

Thank you!
Reply
#2

AccountInfo[playerid][DonatorLevel] > 3) {// Checks for donator level 3 and above
SetPlayerColor(playerid,COLOR_WHITE); // COLOR_WHITE
}
else
{
SendClientMessage(playerid,COLOR_RED,"You're not a level 3 donator! You cannot use this command!");

I think that help ya
Reply
#3

And the:
Quote:

if (strcmp(cmd, "/comprarv", true) ==0 )
{
if(!IsPlayerInAnyVehicle(playerid)){return 1;}
if(GetCreatorID(vehicleid)!=0)
{
if (strmatch(VehicleSystem[GetCreatorID(vehicleid)][owner],Spielername(playerid))){SendClientMessage(playeri d,WHITE," Dieses Auto gehoert dir schon!");return 1;}
if (strmatch(VehicleSystem[GetCreatorID(vehicleid)][owner],"dealercar"))
{
if(VehicleSystem[GetCreatorID(vehicleid)][preis] < GetPlayerMoney(playerid))
{
strmid(VehicleSystem[GetCreatorID(vehicleid)][owner],Spielername(playerid),0,128,12;
GivePlayerMoney(playerid,-VehicleSystem[GetCreatorID(vehicleid)][preis]);
SendClientMessage(playerid,YELLOW," Se divirta com seu novo carro!");
TogglePlayerControllable(playerid,1);
SaveTool();
}
else
{
SendClientMessage(playerid,WHITE,"Vocк precisa de mais dinheiro!");
}
}
else
{
SendClientMessage(playerid,WHITE,"Esse veiculo nгo estб a venda!");
}
}
else
{
SendClientMessage(playerid,WHITE,"Nгo й um carro compravel!");
}
return 1;
}

Where i Put?
Thank you!
Reply
#4

pawn Код:
AccountInfo[playerid][DonatorLevel] > 3)
That means if there OVER 3 not 3 and over...

pawn Код:
AccountInfo[playerid][DonatorLevel] >= 3)
That means if there 3 and over >.>
Reply
#5

AccountInfo[playerid][DonatorLevel] > 3) {// Checks for donator level 3 and above
SetPlayerColor(playerid,COLOR_WHITE); // COLOR_WHITE
}
else
{
SendClientMessage(playerid,COLOR_RED,"You're not a level 3 donator! You cannot use this command!");

Put this in your script where you gone put it lol down on your script
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)