08.07.2010, 00:40
Now I Have this as my /enter and /exit Script.
}
if(!strcmp("/Enter", cmdtext, true))
{
if PlayerToPoint(2116.6833,2416.7131,49.5234);
SetPlayerPos(playerid, 354.9854,150.2702,1025.7964,359.891;
SetPlayerInterior(playerid, 3);
SetPlayerVirtualWorld(playerid, 1);
return 1;
}
if(!strcmp("/Exit", cmdtext, true))
{
if PlayerToPoint(354.9854,150.2702,1025.7964,359.8918 );
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 2116.6833,2416.7131,49.5234);
return 1;
}
return 0;
}
And I Have Copyed a playertopoint off a Tutorial on the forums
( PLAYER TO POINT )
public PlayerToPoint(Float:radi, playerid, Float, Float:y, Float:z)
{
if(IsPlayerConnected(playerid))
{
new Floatldposx, Floatldposy, Floatldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
tempposx = (oldposx -x);
tempposy = (oldposy -y);
tempposz = (oldposz -z);
//printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
return 1;
}
}
return 0;
}
Now When I Compile I Get an Error Saying that :
C:\Program Files\SAMP\SAMP\SAMP\gamemodes\RP2.pwn(472) : error 001: expected token: "*then", but found ";"
C:\Program Files\SAMP\SAMP\SAMP\gamemodes\RP2.pwn(472) : error 036: empty statement
Now Thats my Problem, I Cant seem to get the pattern of Playertopoint to work for me :P Help nao?
}
if(!strcmp("/Enter", cmdtext, true))
{
if PlayerToPoint(2116.6833,2416.7131,49.5234);
SetPlayerPos(playerid, 354.9854,150.2702,1025.7964,359.891;
SetPlayerInterior(playerid, 3);
SetPlayerVirtualWorld(playerid, 1);
return 1;
}
if(!strcmp("/Exit", cmdtext, true))
{
if PlayerToPoint(354.9854,150.2702,1025.7964,359.8918 );
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 2116.6833,2416.7131,49.5234);
return 1;
}
return 0;
}
And I Have Copyed a playertopoint off a Tutorial on the forums
( PLAYER TO POINT )
public PlayerToPoint(Float:radi, playerid, Float, Float:y, Float:z)
{
if(IsPlayerConnected(playerid))
{
new Floatldposx, Floatldposy, Floatldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
tempposx = (oldposx -x);
tempposy = (oldposy -y);
tempposz = (oldposz -z);
//printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
return 1;
}
}
return 0;
}
Now When I Compile I Get an Error Saying that :
C:\Program Files\SAMP\SAMP\SAMP\gamemodes\RP2.pwn(472) : error 001: expected token: "*then", but found ";"
C:\Program Files\SAMP\SAMP\SAMP\gamemodes\RP2.pwn(472) : error 036: empty statement
Now Thats my Problem, I Cant seem to get the pattern of Playertopoint to work for me :P Help nao?