SA-MP Forums Archive
[Question] Undefined symbol ''cmdtext'' - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Question] Undefined symbol ''cmdtext'' (/showthread.php?tid=178148)



[Question] Undefined symbol ''cmdtext'' - jurtes - 20.09.2010

I'm getting the error ''Undefined symbol cmdtext''
It was my first attempt on adding a cmd to OnPlayerPickupPickup. Here is the part of the script the error is coming from:
Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{

if(pickupid == Crackpalice)
        {
        
        if (strcmp("/13532", cmdtext, true, 10) == 0)
	{
		// Do something here
		SetPlayerInterior(playerid, 2);
		SetPlayerPos(playerid, 2567.52,  -1294.59,  1063.25    );
		
 }
        
				
        }

	return 1;
}
Best regards Jur.


Re: [Question] Undefined symbol ''cmdtext'' - gamer931215 - 20.09.2010

You cant put a command atOnPlayerPickUpPickup, commands needs to be putted at OnPlayerCommandtext.


Re: [Question] Undefined symbol ''cmdtext'' - WillyP - 20.09.2010

um, why not make a command that checks if the player is in the icon?


Re: [Question] Undefined symbol ''cmdtext'' - jurtes - 20.09.2010

euhm, If you could explain me how to do that I could hehe.


Re: [Question] Undefined symbol ''cmdtext'' - gamer931215 - 20.09.2010

Quote:
Originally Posted by jurtes
Посмотреть сообщение
euhm, If you could explain me how to do that I could hehe.
What do you exactly want then, like if the player enters the pickup that he teleports, or teleport with a command or.... ?


Re: [Question] Undefined symbol ''cmdtext'' - jurtes - 20.09.2010

I want that if he steps on the pickup he has to type in a command to get teleported into the interior of big smoke's crack palice. So if he is on the pickup for example he has to type /Mafiateleport


Re: [Question] Undefined symbol ''cmdtext'' - Hiddos - 20.09.2010

You'd be best off using IsPlayerInRangeOfPoint then hehe.