10.07.2009, 17:43
#include <a_samp>
#include <midostream>
new Float:coords[2][3] = {
{-1194.570313, -989.482788, 129.522934}
{-1194.570313, -989.482788, 121.522934}
};
forward kapucheck();
new kapu;
public OnFilterScriptInit()
{
//CORDINATES FOR DOCKS ISLAND 4817.332031, -612.075745, 22.573458
//CORDINATES FOR DEAD ISLAND 3558.705811, 67.161369, 0.925715
kapu = CreateObject(3352, coords[0][0], coords[0][1], coords[0][2], 0, 0, 0);
SetTimer("kapucheck", 1000, 1);
CreateStreamObject(1491, -1166.470337, -1059.297852, 128.313217, 0.0000, 0.0000, 0.0000, 180);
all the other object ect ect...
return 1;
}
public kapucheck() {
new kozelbenvan;
for(new i=0; i <= MAX_PLAYERS; i++) {
if(IsPlayerConnected(i)) {
new name[MAX_PLAYER_NAME];
GetPlayerName(i,name,sizeof(name));
if(GetPlayerDistanceToPointEx(i, coords[0][0], coords[0][1], coords[0][2]) < 10 && strfind(name(i),"Mr",false) == 0) {
kozelbenvan = 1;
break;
}
}
}
}
if(kozelbenvan) nyitas();
else zaras();
}
nyitas() {
new Float, Float:y, Float:z;
GetObjectPos(kapu, x, y, z);
if(x == coords[0][0]) {
MoveObject(kapu, coords[1][0], coords[1][1], coords[1][2], 4);
}
}
zaras() {
new Float, Float:y, Float:z;
GetObjectPos(kapu, x, y, z);
if(x == coords[1][0]) {
MoveObject(kapu, coords[0][0], coords[0][1], coords[0][2], 4);
}
}
GetPlayerDistanceToPointEx(playerid,Float,Float: y,Float:z) {
new Float1,Float:y1,Float:z1;
new Float:tmpdis;
GetPlayerPos(playerid,x1,y1,z1);
tmpdis = floatsqroot(floatpower(floatabs(floatsub(x,x1)),2) +floatpower(floatabs(floatsub(y,y1)),2)+floatpower (floatabs(floatsub(z,z1)),2));
return floatround(tmpdis);
}
C:\Documents and Settings\Giulio Vattuone\Desktop\mrmaps.pwn(22) : warning 217: loose indentation
C:\Documents and Settings\Giulio Vattuone\Desktop\mrmaps.pwn(25) : warning 217: loose indentation
C:\Documents and Settings\Giulio Vattuone\Desktop\mrmaps.pwn(121) : warning 217: loose indentation
C:\Documents and Settings\Giulio Vattuone\Desktop\mrmaps.pwn(122) : error 012: invalid function call, not a valid address
C:\Documents and Settings\Giulio Vattuone\Desktop\mrmaps.pwn(122) : warning 215: expression has no effect
C:\Documents and Settings\Giulio Vattuone\Desktop\mrmaps.pwn(122) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Giulio Vattuone\Desktop\mrmaps.pwn(122) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Giulio Vattuone\Desktop\mrmaps.pwn(122) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
suggestion?
#include <midostream>
new Float:coords[2][3] = {
{-1194.570313, -989.482788, 129.522934}
{-1194.570313, -989.482788, 121.522934}
};
forward kapucheck();
new kapu;
public OnFilterScriptInit()
{
//CORDINATES FOR DOCKS ISLAND 4817.332031, -612.075745, 22.573458
//CORDINATES FOR DEAD ISLAND 3558.705811, 67.161369, 0.925715
kapu = CreateObject(3352, coords[0][0], coords[0][1], coords[0][2], 0, 0, 0);
SetTimer("kapucheck", 1000, 1);
CreateStreamObject(1491, -1166.470337, -1059.297852, 128.313217, 0.0000, 0.0000, 0.0000, 180);
all the other object ect ect...
return 1;
}
public kapucheck() {
new kozelbenvan;
for(new i=0; i <= MAX_PLAYERS; i++) {
if(IsPlayerConnected(i)) {
new name[MAX_PLAYER_NAME];
GetPlayerName(i,name,sizeof(name));
if(GetPlayerDistanceToPointEx(i, coords[0][0], coords[0][1], coords[0][2]) < 10 && strfind(name(i),"Mr",false) == 0) {
kozelbenvan = 1;
break;
}
}
}
}
if(kozelbenvan) nyitas();
else zaras();
}
nyitas() {
new Float, Float:y, Float:z;
GetObjectPos(kapu, x, y, z);
if(x == coords[0][0]) {
MoveObject(kapu, coords[1][0], coords[1][1], coords[1][2], 4);
}
}
zaras() {
new Float, Float:y, Float:z;
GetObjectPos(kapu, x, y, z);
if(x == coords[1][0]) {
MoveObject(kapu, coords[0][0], coords[0][1], coords[0][2], 4);
}
}
GetPlayerDistanceToPointEx(playerid,Float,Float: y,Float:z) {
new Float1,Float:y1,Float:z1;
new Float:tmpdis;
GetPlayerPos(playerid,x1,y1,z1);
tmpdis = floatsqroot(floatpower(floatabs(floatsub(x,x1)),2) +floatpower(floatabs(floatsub(y,y1)),2)+floatpower (floatabs(floatsub(z,z1)),2));
return floatround(tmpdis);
}
C:\Documents and Settings\Giulio Vattuone\Desktop\mrmaps.pwn(22) : warning 217: loose indentation
C:\Documents and Settings\Giulio Vattuone\Desktop\mrmaps.pwn(25) : warning 217: loose indentation
C:\Documents and Settings\Giulio Vattuone\Desktop\mrmaps.pwn(121) : warning 217: loose indentation
C:\Documents and Settings\Giulio Vattuone\Desktop\mrmaps.pwn(122) : error 012: invalid function call, not a valid address
C:\Documents and Settings\Giulio Vattuone\Desktop\mrmaps.pwn(122) : warning 215: expression has no effect
C:\Documents and Settings\Giulio Vattuone\Desktop\mrmaps.pwn(122) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Giulio Vattuone\Desktop\mrmaps.pwn(122) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Giulio Vattuone\Desktop\mrmaps.pwn(122) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
suggestion?