i need help... - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: i need help... (
/showthread.php?tid=271843)
i need help... -
Rafa - 26.07.2011
whats wrong and here guys for me this command works clearly but for the other player dont work when he will tupe /repair nothing happens and no sending message btw he is id 0..
pawn Код:
CMD:repair(playerid, params[])
{
if(IsPlayerAdmin2[playerid] == 2)
{
if(IsPlayerVip[playerid] == 2)
{
if(GetPVarInt(playerid,"CMDABUSE") > GetTickCount()) return SendClientMessage(playerid, COLOR_WHITE,"You must wait before using a command");
SetPVarInt(playerid,"CMDABUSE",GetTickCount()+90000);
{
new car = GetPlayerVehicleID(playerid);
RepairVehicle(car);
return 1;
}
}
}
return 1;
}
Sorry for my bad english ..
Thanks xD
Re: i need help... -
Rolyy - 26.07.2011
Since your involving "IsPlayerVip" Are you sure that others are also VIP level +2 on your server?
[EDIT:
Maybe this is what you are trying to make:
If playerid has Admin Level == 2 |OR| has VIP Level == 2 then the function will be continue.
pawn Код:
CMD:repair(playerid, params[])
{
if(IsPlayerAdmin2[playerid] == 2 || IsPlayerVip[playerid] == 2)
{
if(GetPVarInt(playerid,"CMDABUSE") > GetTickCount()) return SendClientMessage(playerid, COLOR_WHITE,"You must wait before using a command");
SetPVarInt(playerid,"CMDABUSE",GetTickCount()+90000);
{
new car = GetPlayerVehicleID(playerid);
RepairVehicle(car);
return 1;
}
}
return 1;
}
]
Re: i need help... -
Rafa - 26.07.2011
yeah maybe its like this but he have and vip rights and admin rights and still cant using the command
btw ill try this and ill post a comment here ..
Re: i need help... -
Rafa - 26.07.2011
Thanks dude it works

xD
Re: i need help... -
Rolyy - 26.07.2011
Quote:
Originally Posted by Rafa
Thanks dude it works  xD
|
Welcome dude

.
Try studying the link underneath, it helped me alot in scripting knownledge. And if your intrested read the whole page, for me it was very intresting and helpfull.
https://sampwiki.blast.hk/wiki/Control_Structures#Operators