Limit of usage - 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)
+--- Thread: Limit of usage (
/showthread.php?tid=491615)
Limit of usage -
davve95 - 31.01.2014
How could I make so the limit it is like 3 times/usage?..
I mean with this, I don't remember what it's named but, I'll show:
pawn Код:
if (strcmp("/barrier", cmdtext, true, 10) == 0)
{
{
if(BarrierUse[playerid] == 0)
{
BarrierUse[playerid]=8;
GetPlayerPos(playerid, X, Y, Z);
CreateObject(935, X, Y, Z, 0.0000, 0.0000, -253.5601); //drum, cable roll: 933
}
//else
// {
// SendClientMessage(playerid, Red, "You have alredy used 8 barriers!");
// }
}
return 1;
}
return 0;
}
I have tired under there and it didn't work so I just commented it..
It's hard to explain!, but I hope you get it, thansk a lot.
Edit: And I have also tierd to change to 8 here:
if(BarrierUse[playerid] == 0)
But it didn't neither work..
Re: Limit of usage -
Konstantinos - 31.01.2014
On connect, set BarrierUse[playerid] to 0. In the command:
pawn Код:
if (BarrierUse[playerid] <= 8)
{
++BarrierUse[playerid];
GetPlayerPos(playerid, X, Y, Z);
CreateObject(935, X, Y, Z, 0.0000, 0.0000, -253.5601)
}
else SendClientMessage(playerid, Red, "You have alredy used 8 barriers!");
Re: Limit of usage -
davve95 - 31.01.2014
Quote:
Originally Posted by Konstantinos
On connect, set BarrierUse[playerid] to 0. In the command:
pawn Код:
if (BarrierUse[playerid] <= 8) { ++BarrierUse[playerid]; GetPlayerPos(playerid, X, Y, Z); CreateObject(935, X, Y, Z, 0.0000, 0.0000, -253.5601) } else SendClientMessage(playerid, Red, "You have alredy used 8 barriers!");
|
Thanks a lot!
.