Problem
#1

Hey, for my RP server, I want the command /showmebank to take the player infront of the bank to show them where it is, but they cant move, and when they are done, they can do /takemeback and it will take them back to where they were... I am a noob scripter and I came up with this but it returns errors.

Код:
	if(strcmp(cmd,"/showmebank", true) ==0)
	{
		GetPlayerPos(playerid, Float:x, Float:y, Float:z);
		SetPlayerPos(playerid, 0,0,0)
		SetPlayerControllable(playerid, 0)
 }
		else if(strcmp(cmd,"/takemeback", true) ==0)
 {
    SetPlayerPos(playerid, x, y, z);
		return 1;
 }
(thats saying 0,0,0, is the bank, (as test))

thanks
Reply
#2

Код:
	if(strcmp(cmd,"/showmebank", true) ==0)
	{
		GetPlayerPos(playerid, Float:x, Float:y, Float:z);
		SetPlayerPos(playerid, 0,0,0);
		SetPlayerControllable(playerid, 0);
 }
		else if(strcmp(cmd,"/takemeback", true) ==0)
 {
    SetPlayerPos(playerid, x, y, z);
		return 1;
 }
Sorry.. I put the ; where they are required but I still get this:

Код:
C:\Documents and Settings\Tom\Desktop\gf.pwn(10901) : error 017: undefined symbol "x"
C:\Documents and Settings\Tom\Desktop\gf.pwn(10903) : error 017: undefined symbol "SetPlayerControllable"
C:\Documents and Settings\Tom\Desktop\gf.pwn(10907) : error 017: undefined symbol "x"
Reply
#3

Код:
new Float:Pos[3],Bank_A[MAX_PLAYERS];

if(strcmp(cmd,"/bank", true) ==0)
{
if(!Bank_A[playerid])
{
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
SetPlayerPos(playerid,0,0,0);
TogglePlayerControllable(playerid,false);
Bank_A[playerid]=true;
}
else if(Bank_A[playerid])
{
SetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
TogglePlayerControllable(playerid,true);
Bank_A[playerid]=false;
}
return true;
}
Reply
#4

thank you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)