SA-MP Forums Archive
Teleport Cmd Question - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Teleport Cmd Question (/showthread.php?tid=399310)



Teleport Cmd Question - RCS - 13.12.2012

Hi can u tell me what's wrong in my FS?!
i search on net and i cant find the mistake in my code.. btw im still beginner ...

Код:
if (strcmp(cmdtext,"/battle",true))
	{
        SetPlayerPos(playerid, 1760.2731,201.5875,25.8611);
    	SendClientMessage(playerid, blue, "You were teleported to the battle field!");
    	new string[52];
		GetPlayerName(playerid, string, MAX_PLAYER_NAME);
		format(string, sizeof string, "%s was teleported to the battlefield!", string);
		SendClientMessageToAll(ltblue, string);
        return 1;
	}
	return 0;
}
compilation and runing, no problems in game i type /battle, but it doesnt teleport me
btw can someone after this tell me how to set countdown in the teleport, like
5-4-3-2-1 and teleport!


Re: Teleport Cmd Question - RCS - 13.12.2012

Sorry, ltblue and blue are defined btw it will show error,
filterscript told ya is working, i have weapon cmds on that filterscript, 100% working,

but i dont get it, if something is wrong the compilation will show problem,
-----
i mean everything is working except from that teleport cmd ...


Re: Teleport Cmd Question - Riddy - 13.12.2012

pawn Код:
if (strcmp(cmdtext, "/battle" , true) == 0)
{
    SendClientMessage(playerid, blue, "You were teleported to the battle field!");
    SetPlayerPos(playerid, 1760.2731,201.5875,25.8611);
    new string[52], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(string, sizeof string, "%s was teleported to the battlefield!", name);
    SendClientMessageToAll(ltblue, string);
    return 1;
}
Try that


Re: Teleport Cmd Question - RCS - 14.12.2012

Ahhhh sorry everyone i was wrong in my FS,
I've had two commands on cmd test /battle

i remove the one and now its working btw after i open this theard , can u tell me how to set countdown for the teleport?!


Re: Teleport Cmd Question - Riddy - 14.12.2012

pawn Код:
if (strcmp(cmdtext, "/battle" , true) == 0)
{
    SendClientMessage(playerid, blue, "You were teleported to the battle field!");
    SetTimerEx("Teleport", 6000, false, "i", playerid);
    new string[52], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(string, sizeof string, "%s was teleported to the battlefield!", name);
    SendClientMessageToAll(ltblue, string);
    return 1;
}

forward Teleport(playerid);
public Teleport(playerid)
{
    SetPlayerPos(playerid, 1760.2731,201.5875,25.8611);
    return 1;
}

Sure this'll work.


Re: Teleport Cmd Question - RCS - 14.12.2012

No no, i fix the teleport, when i type /battle in game it teleports me to the position,
if someone can tell me how to set countdown, like 5-4-3-2-1 and teleport...


Re: Teleport Cmd Question - Riddy - 14.12.2012

Quote:
Originally Posted by RCS
Посмотреть сообщение
No no, i fix the teleport, when i type /battle in game it teleports me to the position,
if someone can tell me how to set countdown, like 5-4-3-2-1 and teleport...
That is exactly what I did, unless you want to show the 'countdown'


Re: Teleport Cmd Question - RCS - 14.12.2012

yes i see now, thankss


Re: Teleport Cmd Question - RCS - 14.12.2012

Prob fixed