Posts: 40
Threads: 7
Joined: Jan 2009
Reputation:
0
This is the code:
public OnPlayerPickUpPickup(playerid, pickupid)
{
AddStaticPickup(1272, 2, -83.0494, 9.7471, 3.1172);
new tag[10], name[30];
GetPlayerName(playerid, name, 30);
format(tag, 10, "[Y]", tag);
Teleport(playerid, 2324.419921, -1145.568359, 1050.710083, 88.2612, 12, false);
if(strfind(name, tag, true) == -1)
{
SendClientMessage(playerid, COLOR_GREEN, "You cannot teleport to this place as you are not in The Yardies gang.");
return 1;
}
return Teleport(playerid, 2324.419921, -1145.568359, 1050.710083, 88.2612, 12, false);
}
}
it compiles, however, when I enter every single pickup whether it is a weapon or armour or any other pickup it teleports me to 2324.419921, -1145.568359, 1050.710083, 88.2612. Help?
Posts: 40
Threads: 7
Joined: Jan 2009
Reputation:
0
And what H&A supposed to be? I tried it, look at these error messages:
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\ponyfarming.pwn(33) : error 001: expected token: ";", but found "&"
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\ponyfarming.pwn(49) : error 017: undefined symbol "A"
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\ponyfarming.pwn(1084) : error 017: undefined symbol "A"
Posts: 534
Threads: 33
Joined: Aug 2008
Reputation:
0
change the H&A in HealthArmour , or OTHER NAME
Posts: 40
Threads: 7
Joined: Jan 2009
Reputation:
0
I tried, and it's still same.
Posts: 1,072
Threads: 25
Joined: Jun 2007
Reputation:
0
Show the code YOU are trying to compile.
Posts: 40
Threads: 7
Joined: Jan 2009
Reputation:
0
new H&A;
public OnPlayerPickUpPickup(playerid, pickupid)
{
if (pickupid == H&A)
AddStaticPickup(1272, 2, -83.0494, 9.7471, 3.1172);
new tag[10], name[30];
GetPlayerName(playerid, name, 30);
format(tag, 10, "[Y]", tag);
Teleport(playerid, 2324.419921, -1145.568359, 1050.710083, 88.2612, 12, false);
if(strfind(name, tag, true) == -1)
{
SendClientMessage(playerid, COLOR_GREEN, "You cannot teleport to this place as you are not in The Yardies gang.");
return 1;
}
return Teleport(playerid, 2324.419921, -1145.568359, 1050.710083, 88.2612, 12, false);
}
}
//OnGameModeInit
H&A = CreatePickup(1272, 2, -83.0494, 9.7471, 3.1172);
there you go
Posts: 40
Threads: 7
Joined: Jan 2009
Reputation:
0
public OnPlayerPickUpPickup(playerid, pickupid)
{
if (pickupid == HealthArmour)
AddStaticPickup(1272, 2, -83.0494, 9.7471, 3.1172);
new tag[10], name[30];
GetPlayerName(playerid, name, 30);
format(tag, 10, "[Y]", tag);
Teleport(playerid, 2324.419921, -1145.568359, 1050.710083, 88.2612, 12, false);
if(strfind(name, tag, true) == -1)
{
SendClientMessage(playerid, COLOR_GREEN, "You cannot teleport to this place as you are not in The Yardies gang.");
return 1;
}
return Teleport(playerid, 2324.419921, -1145.568359, 1050.710083, 88.2612, 12, false);
}
What am I doing wrong?
Posts: 40
Threads: 7
Joined: Jan 2009
Reputation:
0
ok I tried this aswell:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if (pickupid == HealthArmour)
{
new tag[10], name[30];
GetPlayerName(playerid, name, 30);
format(tag, 10, "[Y]", tag);
Teleport(playerid, 2324.419921, -1145.568359, 1050.710083, 88.2612, 12, false);
if(strfind(name, tag, true) == -1)
}
SendClientMessage(playerid, COLOR_GREEN, "You cannot teleport to this place as you are not in The Yardies gang.");
return 1;
}
return Teleport(playerid, 2324.419921, -1145.568359, 1050.710083, 88.2612, 12, false);
}
And it gave me one error: C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\ponyfarming.pwn(1095) : error 029: invalid expression, assumed zero
Posts: 53
Threads: 2
Joined: Jun 2007
Reputation:
0
Whats on line 1095, and a few lines in front, plus a few lines after?