Array help
#1

hey there i need to make a player to point arrary useing this code



Код:
if(!strcmp("/rob", cmdtext, true) && PlayerToPoint(10 ,playerid,372.8418,-8.6437,1001.8516))
 {
  if(IfPlayerIsRobed[playerid] == 0)
  {
  new pName[MAX_PLAYER_NAME];
  new string[48];
  GetPlayerName(playerid, pName, sizeof(pName));
  format(string, sizeof(string), "%s hase stolen some money", pName);
	GivePlayerMoney(playerid, 10000); // Give the player the money
  SetPlayerWantedLevel(playerid, 5);
  SendClientMessageToAll(0xDEEE20FF, string);
  IfPlayerIsRobed[playerid] = 1;
  SetTimerEx("RobWaitTimer", 10000, 0, "i", playerid);
}
else if(IfPlayerIsRobed[playerid] == 1)
{
SendClientMessage(playerid, COLOR_RED, "You Have Already Robed Plz Wait");
}
else
{
SendClientMessage(playerid, COLOR_RED, "You are not in area");
}
Reply
#2

What's the problem, just save all coords in 3 arrays
new RobX[]={
1.000000,
2.000000
};
new RobY[]={
3.000000,
4.000000
};
new RobZ[]={
5.000000,
6.000000
};
If it's just one, then you can do like this
enum Axis
{
X,
Y,
Z
};
new RobCoords[Axis];
Using : RobCoords[X]=value and so on...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)