Need help with "/sendto" CMD
#1

As you see i tried to make some new Teleport CMDs and i didn't do anything wrong , no errors , no warnings but when i /sendto (Location) (ID) it gives me AdmWarning of the player i sent but it sends me to the location instead of that player

Note: old TP's location such as /sendto LSPD is working fine but /sendto FBI (new) is bugged

Код:
}
		else if(!strcmp(tmp,"lspd",true) || !strcmp(tmp,"ls",true))
		{
		    destination = "Los Santos Police Department";
		    Teleport(giveplayerid,1529.6,-1691.2,13.3,a,0,0,p);
THIS WORKS FINE




	        else if (!strcmp(tmp,"fbi",true))
		{
	 	    destination = "Federal Bureau of Investigation";
		    Teleport(giveplayerid,1774.0156,-1667.2211,14.4259,a,0,0,p);
        }
THIS CMD SENDS ME INSTEAD OF THE PLAYER
Reply
#2

Show full codes, Might be bracket mistake.

Show me down part of the codes.
Reply
#3

}
else if(!strcmp(tmp,"sfair",true) || !strcmp(tmp,"sf",true))
{
destination = "San Fierro Airport";
Teleport(giveplayerid,-1417.0,-295.8,14.1,a,0,0,p);
}
else if(!strcmp(tmp,"lvair",true) || !strcmp(tmp,"lv",true))
{
destination = "Las Venturas Airport";
Teleport(giveplayerid,1699.2,1435.1, 10.7,a,0,0,p);
}
else if(!strcmp(tmp,"jet",true))
{
destination = "private jet";
Teleport(giveplayerid,1.71875, 30.4062, 1200.34,a,1,0,0);
}
else if (!strcmp(tmp,"chiliad",true))
{
destination = "Mt. Chiliad";
Teleport(giveplayerid,-2317.5325,-1644.9664,483.7031,a,0,0,p);
}
else if (!strcmp(tmp,"area51",true))
{
destination = "Area 51";
Teleport(giveplayerid,202.1886,1881.4122,17.2199,3 7.8779,0,0,p);
}
else if (!strcmp(tmp,"aa",true))
{
destination = "Desert Airstrip";
Teleport(giveplayerid,357.5273,2513.8701,16.5856,a ,0,0,p);
}
else if (!strcmp(tmp,"Tower",true) || !strcmp(tmp,"sky",true))
{
destination = "Star Tower";
Teleport(giveplayerid,1543.9886,-1353.7587,329.4735,a,0,0,p);
}
else if (!strcmp(tmp,"bayside",true))
{
destination = "Bayside Heliport";
Teleport(giveplayerid,-2252.2944,2335.5396,4.8125,a,0,0,p);
}
else if (!strcmp(tmp,"underwater",true) || !strcmp(tmp,"under",true))
{
destination = "under the sea";
Teleport(giveplayerid,-1005.3044,657.4559,-39.0847,a,0,0,p);
}
else if (!strcmp(tmp,"bank",true))
{
destination = "The Bank";
Teleport(giveplayerid,1462.395751,-1016.391174,25.84375,a,0,0,p);
}
else if (!strcmp(tmp,"pier",true))
{
destination = "the fishing pier";
Teleport(giveplayerid,364.9920,-2059.7288,15.3990,a,0,0,p);
}
else if (!strcmp(tmp,"battlefield",true) || !strcmp(tmp,"battle",true))
{
destination = "the battlefield";
Teleport(giveplayerid,-972.4957,1060.9830,1345.6690,a,10,0,p);
}
else if (!strcmp(tmp,"dam",true))
{
destination = "the Sherman Dam";
Teleport(giveplayerid,-715.0000,2062.0000,60.0000,a,0,0,p);
}
else if (!strcmp(tmp,"bloodbowl",true))
{
destination = "Bloodbowl Arena";
Teleport(giveplayerid,-1394.5928,996.4797,1033.8864,a,15,0,p);
}
else if (!strcmp(tmp,"8track",true))
{
destination = "8-Track Stadium";
Teleport(giveplayerid,-1406.3815,-262.7644,1043.4290,346.8336,7,0,p);
}
else if (!strcmp(tmp,"dirtbike",true))
{
destination = "Dirtbike Stadium";
Teleport(giveplayerid,-1436.2065,-642.5217,1049.5261,167.3703,4,0,p);
}
else if (!strcmp(tmp,"kickstart",true))
{
destination = "Kickstart Stadium";
Teleport(giveplayerid,-1447.2618,1604.3374,1052.5220,263.7223,14,0,p);
}
else if (!strcmp(tmp,"quarry",true))
{
destination = "Hunter Quarry";
Teleport(giveplayerid,609.8776,867.3369,-42.2692,a,0,0,p);
}
else if (!strcmp(tmp,"grove",true))
{
destination = "Grove Street";
Teleport(giveplayerid,2485.9900,-1665.5873,13.3438,a,0,0,p);
}
else if (!strcmp(tmp,"glen",true))
{
destination = "Glen Park";
Teleport(giveplayerid,2000.2689,-1127.3099,25.4989,a,0,0,p);
}
else if (!strcmp(tmp,"sasd",true))
{
destination = "Dillimore";
Teleport(giveplayerid,649.1885,-575.2327,16.2580,a,0,0,p);
}
else if (!strcmp(tmp,"fbi",true))
{
destination = "Federal Bureau of Investigation";
Teleport(giveplayerid,1774.0156,-1667.2211,14.4259,a,0,0,p);
}
else if (!strcmp(tmp,"lsfmd",true))
{
destination = "Los Santos Fire & Medic Department";
Teleport(giveplayerid,1534.4153,-2176.2051,13.6681,a,0,0,p);
}
else if (!strcmp(tmp,"news",true))
{
destination = "SANews";
Teleport(giveplayerid,775.3521,-1341.1422,13.5297,a,0,0,p);
}
else if (!strcmp(tmp,"hh",true))
{
destination = "Hitman HQ";
Teleport(giveplayerid,2272.2300,-84.9483,26.5113,a,0,0,p);
}
else if (!strcmp(tmp,"unity",true))
{
destination = "Unity Station";
Teleport(giveplayerid,1775.7028,-1860.5249,13.5786,a,0,0,p);
}
else if (!strcmp(tmp,"mp1",true))
{
destination = "Materials Pickup 1";
Teleport(giveplayerid,1422.4298,-1326.2065,13.5599,a,0,0,p);
}
else if (!strcmp(tmp,"mf1",true))
{
destination = "Materials Factory 2";
Teleport(giveplayerid,2180.2515,-2276.6238,13.5134,a,0,0,p);
}
else if (!strcmp(tmp,"mp2",true))
{
destination = "Materials Pickup 2";
Teleport(giveplayerid,2407.0796,-2013.6967,13.5469,a,0,0,p);
}
else if (!strcmp(tmp,"mf2",true))
{
destination = "Materials Factory 2";
Teleport(giveplayerid,2282.4541,-1113.7208,37.9766,a,0,0,p);
}
else if (!strcmp(tmp,"cl",true))
{
destination = "Crack Lab";
Teleport(giveplayerid,2344.8000,-1184.2073,1027.9766,a,5,0,p);
}
else if (!strcmp(tmp,"ffc",true))
{
destination = "Fossil Fuel Company";
Teleport(giveplayerid,2642.4180,-2115.1885,13.5469,a,0,0,p);
}
else if (!strcmp(tmp,"aec",true))
{
destination = "Auto Export Company ";
Teleport(giveplayerid,2748.6296,-2492.8662,13.6432,a,0,0,p);
}
else if (!strcmp(tmp,"spf",true))
{
destination = "Sprunk Factory";
Teleport(giveplayerid,1336.2542,288.3505,19.5615,a ,0,0,p);
}
else if (!strcmp(tmp,"tune1",true))
{
destination = "Tuning Shop 1";
Teleport(giveplayerid,2644.6919,-2028.8428,13.5469,a,0,0,p);
}
else if (!strcmp(tmp,"tune2",true))
{
destination = "Tuning Shop 2";
Teleport(giveplayerid,-2711.6787,218.8078,4.2093,a,0,0,p);
}
else if (!strcmp(tmp,"tune3",true))
{
destination = "Tuning Shop 3";
Teleport(giveplayerid,1041.2430,-1037.9379,31.7534,a,0,0,p);
}
else if (!strcmp(tmp,"tune4",true))
{
destination = "Tuning Shop 4";
Teleport(giveplayerid,2386.9270,1038.1072,10.8203, a,0,0,p);
}
else
{
return SendClientMessage(giveplayerid, COLOR_FADE1,"Invalid destination.");
}
// format string and send to player
format(string, sizeof(string),"Sent to ~b~%s~w~!",destination);
displayCenterHUDInfo(giveplayerid, string, ; //display for 8 seconds
format(string, sizeof(string), "{FF0000}AdmWarning{FFFFFF}: %s has sent %s to \"%s\"", PlayerRPName(playerid), PlayerRPName(giveplayerid), destination);
ABroadCast(COLOR_WHITE, string, 1);
return 1;
Reply
#4

Above elseif the line which was not working add this }
pawn Код:
}
else if (!strcmp(tmp,"fbi",true))
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)