Teleport Cmd Question
#1

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!
Reply
#2

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 ...
Reply
#3

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
Reply
#4

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?!
Reply
#5

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.
Reply
#6

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...
Reply
#7

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'
Reply
#8

yes i see now, thankss
Reply
#9

Prob fixed
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)