Trying to figure out how to do something... -
So here's where I'm at: I have 3 points available to set (this is a test for something else). After someone sets a point, it needs to toggle to not be able to be set anymore, like set it to '1', and if it is '1' already, to say that it's already used. Here's what I do have...
pawn Код:
#define FILTERSCRIPT
//I know there's many ways of compressing this. This is as far as my knowledge works.
#include <a_samp>
new point;
new point2;
new point3;
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/POINT", cmdtext, true, 10) == 0)
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
if (point==true)
{
if (point2==true)
{
if (point3==true)
{
print("No points left.");
return 1;
}
else
{
point3=CreatePickup(1318, 1, x,y,z, -1);
point3==true; //Clearly not woking like I wanted lol
return 1;
}
}
else
{
point2=CreatePickup(1318, 1, x,y,z, -1);
point2==true;
return 1;
}
}
else
{
point=CreatePickup(1318, 1, x,y,z, -1);
point==true;
return 1;
}
}
if (strcmp("/DPOINT", cmdtext, true, 10) == 0)
{
DestroyPickup(point);
return 1;
}
return 0;
}