[Tutorial] Entering building when enters CP
#1

Here is some easy tutorial.

What is this tutorial about?
You enter a checkpoint and it shows you a dialog"do you want to enter building or not".
YOU MUST HAVE STREAMER PLUGIN


So lets start..

On top of your script add

Code:
new hello;
Under public OnGameModeInIt add

Code:
hello = CreateDynamicCP(x,y,z, 1.5, -1, -1, -1, 40.0);
Find public OnPlayerEnterDynamicCP i under it add

Code:
if(checkpointid == hello) ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX," Do you want to enter this building",tempstring,"Yes","No");
Now we need to make what will happen if player chooses "Yes"

Under OnDialogResponse add

Code:
if(dialogid == 1 && response)
 {
SetPlayerPos(playerid,x,y,z);
}
If you get error that tempstring is not defined,under public OnPlayerEnterDynamicCP
add

Code:
new tempstring[100];
Sorry for my bad English,Im from Bosnia
dont watch posts,This is my first post on this forum because I come from balkan-samp.com
Reply


Messages In This Thread
Entering building when enters CP - by Sub Zero - 29.11.2010, 15:24
Re: Entering building when enters CP - by Tee - 29.11.2010, 21:56
Re: Entering building when enters CP - by Sub Zero - 30.11.2010, 05:25
Re: Entering building when enters CP - by the.et - 31.12.2011, 14:11
Re: Entering building when enters CP - by Mr.Dexter - 31.03.2013, 16:11
Re: Entering building when enters CP - by thefatshizms - 31.03.2013, 16:14
Re: Entering building when enters CP - by Mr.Dexter - 02.04.2013, 06:25
Re: Entering building when enters CP - by RajatPawar - 02.04.2013, 06:31
Re: Entering building when enters CP - by cuemur - 15.05.2013, 11:56

Forum Jump:


Users browsing this thread: 3 Guest(s)