Easy
enum pInfo
{
others,
bla,
Teleporting
}
add Teleporting
then
public Armyloc()
{
for(new i = 0; i <= MAX_PLAYERS; i++) {
if(IsPlayerConnected(i) && PlayerInfo[Teleporting] == 1)
{
SetPlayerPos(i, -1718.1532,-245.1667,14.8683,1.00);
SendClientMessage(i,BLUE,"You Have been Teleported to Army Base. Cost 1000$");
}
}
}
then add
OnPlayerText(playerid, cmdtext[])
{
else if (strcmp(cmd, "!army", true) == 0)
{
tmp = strtok(cmdtext, idx);
if (!strlen(tmp)) {
PlayerInfo[playerid][Teleporting] = 1;
SendClientMessage(playerid,BLUE,"Teleporting to Army Base in 7 secs");
GameTextForPlayer(playerid,"~w~Teleporting ~b~please ~y~wait");// ~b~ ~y~ ~w~ are colors
SetTimer("Armyloc",1000*7,0); // 7 secs and 0 = loop none
}
return 1;
}
Made in 1 minute
EDIT :O_o Just fixed playerid to "i"