30.09.2011, 20:15
Hi, for my server I want to make something like in GTA SA singleplayer
when doing a mission there will be a little textdraw with a conversation between everyone who is in the car...
I have asked some help in script request and stuff but it just does not work...
ok so my code:
(under OnPlayerConnect)
function that I made
I put it here:
this CP will be toggled when a player enters the first CP
Made 2 conversations so far...
I get no errors, but when I enter CP 2 I get the messages of the CP but the jobtalk just does not start :/ any help?
plus rep for helper ofc
when doing a mission there will be a little textdraw with a conversation between everyone who is in the car...
I have asked some help in script request and stuff but it just does not work...
ok so my code:
pawn Код:
new Text:talking;
pawn Код:
talking = TextDrawCreate(186, 406, " ");
TextDrawFont(talking, 1);
TextDrawSetShadow(talking,0);
TextDrawSetOutline(talking,1);
TextDrawTextSize(talking, 2.0, 3.0);
pawn Код:
TextDrawShowForPlayer(playerid,talking);
pawn Код:
jobtalk(playerid);
I put it here:
pawn Код:
if(IsPlayerInDynamicCP(playerid, TRAVJ1))
{
if(IsWorking[playerid] != 1)
{
SendClientMessage(playerid, COLOR_RED, "This is used in a drivers mission");
return 1;
}
if(vehicle != 516)
{
SendClientMessage(playerid,COLOR_RED,"You are not in the right vehicle for this mission!");
return 1;
}
TogglePlayerDynamicCP(playerid, TRAVJ1, false);
TogglePlayerDynamicCP(playerid, TRAVJ2, true);
SendClientMessage(playerid, COLOR_YELLOW, "Step 1/2");
//RemovePlayerMapIcon( playerid, 2 );
//SetPlayerMapIcon( playerid, 2, 2732.6616,-1841.6346,9.9145, 41, 0, MAPICON_GLOBAL );
//Talk function
jobtalk(playerid);
return 1;
}
pawn Код:
jobtalk(playerid)
{
SetTimerEx("SumTimer",10000,1,"i",playerid);
}
pawn Код:
public SumTimer(playerid)
{
TimeValue++;
if(Job[playerid] == Travis)
{
switch(TimeValue)
{
case 0: TextDrawSetString(talking,"*Travis: Hi I'm Travis Pastrana, You're my driver, right?");
case 1: TextDrawSetString(talking,"*You: Yes that's correct, I'm your driver for today!");
case 2: TextDrawSetString(talking,"*Travis: Ok, nice to meet you, I hope you bring safe to the stadium");
case 3: TextDrawSetString(talking,"*You: I ensure you, I'm the best driver in town!");
case 4: TextDrawSetString(talking,"*Travis: Haha ok, then mate");
case 5: TextDrawSetString(talking,"*You: lol");
case 6: TextDrawSetString(talking,"*you: So tell me Travis, are you nervous for tonight?");
case 7: TextDrawSetString(talking,"*Travis: yes, I'm kinda nervous, it's a really big deal you know...");
case 8: TextDrawSetString(talking,"*You: Yeah, tell me what...");
case 9: TextDrawSetString(talking,"*Travis: You drive motorcycles too??");
case 10: TextDrawSetString(talking,"*You: Me??? No, only Nebula's and my wife...");
case 11: TextDrawSetString(talking,"*Travis: Eww -.-");
case 12: TextDrawSetString(talking,"*You: Oh, Excuse me, inapropriate?");
case 13: TextDrawSetString(talking,"*Travis: Nono, it's ok mate");
case 14: TextDrawSetString(talking,"*You: Ok then");
case 15: TextDrawSetString(talking,"*You: 'dumdum, dumdum'");
case 16: TextDrawSetString(talking,"*Travis: What's wrong?");
case 17: TextDrawSetString(talking,"*You: Wrong? oh, nothings wrong! I just got this new maddog song in ma head dawg");
case 18: TextDrawSetString(talking,"*Travis: Meh, I don't really like Rap songs, I find them too inapropriate");
}
}
else if(Job[playerid] == Burger)
{
switch(TimeValue)
{
case 0: TextDrawSetString(talking,"*Server owner: You, there little slave, bring me a burger! now!");
case 1: TextDrawSetString(talking,"*You: Omg, why so rude!!!");
case 2: TextDrawSetString(talking,"*Server owner: Oh, excuse me, you thought I was nice? You thought the server owner was nice!");
case 3: TextDrawSetString(talking,"*Server owner: No!! the server owner has powers, and of course I missuse them!");
case 4: TextDrawSetString(talking,"*You: Wow, little prick!");
case 5: TextDrawSetString(talking,"*Server owner: Wanna get banned? is that what cha want?");
case 6: TextDrawSetString(talking,"*You: Okok I'm sorry *whisper* stupid asshole*");
case 7: TextDrawSetString(talking,"*Server owner: What did u say?");
case 8: TextDrawSetString(talking,"*You: Euhm, I said I'm sorry");
case 9: TextDrawSetString(talking,"*Server owner: Good now, go get my goddamn burger!");
case 10: TextDrawSetString(talking,"*You: dumdumdidumdum! dumdumdadum");
case 11: TextDrawSetString(talking,"*Server owner: Are you singing");
case 12: TextDrawSetString(talking,"*You: Yes its the new maddog!");
case 13: TextDrawSetString(talking,"*Server owner: Stop it! I hate singing");
case 14: TextDrawSetString(talking,"*You: -.-");
case 15: TextDrawSetString(talking,"*You: -.-");
case 16: TextDrawSetString(talking,"* : What's wrong?");
case 17: TextDrawSetString(talking,"*You: Wrong? oh, nothings wrong! I just got this new maddog song in ma head dawg");
case 18: TextDrawSetString(talking,"*Travis: Meh, I don't really like Rap songs, I find them too inapropriate");
}
}
return 1;
}
I get no errors, but when I enter CP 2 I get the messages of the CP but the jobtalk just does not start :/ any help?
plus rep for helper ofc