[HELP] /jobhelp
#1

Hiya guys ive made /jobhelp for my jobs but im getting 2 errors undefined symbol "playerid undefined symbol "cmd" can someone help me on this one coz im stuck ile highlight the lines in red for ya so u can see better

Thanks

[quote]
if(strcmp(cmd, "/jobhelp", true) == 0)
{
if(PlayerInfo[playerid][pJob] != 1
{
if(TutTime[i] >= 1)
{
TutTime[i] += 1;
if(TutTime[i] == 3)
{
SendClientMessage(i, COLOR_GREEN, "Welcome to the harvister job.");
SendClientMessage(i, COLOR_YELLOW, "Head over to the barn and hop into one of there Harvisters .");
SendClientMessage(i, COLOR_YELLOW, "Type /harvest to activate the harvest job .");
}
else if(TutTime[i] == 6)
{
SendClientMessage(i, COLOR_GREEN, "Head threw the Markers to havest the feilds without killing yourselve.");
SendClientMessage(i, COLOR_YELLOW, "Then drop your load at this shed and receve your payment .");
SendClientMessage(i, COLOR_YELLOW, "You will need to wait 30 miniutes before you can harvest again .");
}
return 1;
}
}
}
Reply
#2

pawn Код:
if (strcmp("/jobhelp", cmdtext, true, 8) == 0)
have you got that in:

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
Reply
#3

OK i got it compiled with no errors now but nothing happens when i do /jobhelp and i did make sure im pjob18.. so now can someone help me remove the TutTime an replace it with ist own timer as im not good with timers and dont now how to set them up

Regards Linxx

[quote]

if(strcmp(cmd, "/jobhelp", true) == 0)
{
if(PlayerInfo[playerid][pJob] != 1
{
if(TutTime[i] >= 1)
{
TutTime[i] += 1;
if(TutTime[i] == 3)
{
SendClientMessage(i, COLOR_GREEN, "Welcome to the harvister job.");
SendClientMessage(i, COLOR_YELLOW, "Head over to the barn and hop into one of there Harvisters .");
SendClientMessage(i, COLOR_YELLOW, "Type /harvest to activate the harvest job .");
}
else if(TutTime[i] == 6)
{
SendClientMessage(i, COLOR_GREEN, "Head threw the Markers to havest the feilds without killing yourselve.");
SendClientMessage(i, COLOR_YELLOW, "Then drop your load at this shed and receve your payment .");
SendClientMessage(i, COLOR_YELLOW, "You will need to wait 30 miniutes before you can harvest again .");
}
return 1;
}
}
}
}
Reply
#4

soz for dubble post bbu can anyone help me?
Reply
#5

You can't put commands in the tutorial part. Commands have to be placed on the public OnPlayerCommandText.
Reply
#6

yea i have placed it with the other commands but it done seem to work
Reply
#7

Ok guys if got my jobhelp working now but one other question how can i set it up for mutiple jobs ie like 12 jobs show 12 sets of different text so if your pjob1 and do /jobhelp your job stuff will come up and if your pjob20 that jobstuff will come up. it there a easier way of doing this rather than making this 20 times and editing it?? And also where do i put these in the help coz i will be putting camera position in all the jobhelps..

SetPlayerInterior(i,0);
SetPlayerVirtualWorld(i, 100);
SetPlayerCameraPos(i, 69.7546,-1302.1440,145.6709);
SetPlayerCameraLookAt(i, 385.2643,-1358.7419,85.8614);

Код:
new HelpTimer[MAX_PLAYERS] = -1;
forward HelpPublic(playerid);

public HelpPublic(playerid)
{
static Number[MAX_PLAYERS], Text[][] =
{
{"Welcome to the harvister job"},
{"Head over to the barn and hop into one of there Harvisters"},
{"Type /harvest to activate the harvest job"},
{""}
{"Head threw the Markers to havest the feilds without killing yourselve"}
{"Then drop your load at this shed and receve your payment"}
{"You will need to wait 30 miniutes before you can harvest again"}
{""}

};
SendClientMessage(playerid, 0xFFFFFFFF, Text[Number[playerid]++]);
if(Number[playerid] == sizeof(Text))
{
Number[playerid] = false;
KillTimer(HelpTimer[playerid]);
}
}



public OnPlayerCommandText(playerid, cmdtext[])
{
	if(strcmp(cmd, "/jobhelp", true) == 0)
  {
		if(PlayerInfo[playerid][pJob] != 1)
    {
	  	HelpTimer[playerid] = SetTimerEx("HelpPublic", 1000, true, "i", playerid);
		}
		return 0;
	}
}
Reply
#8

Nope didnt work so i will be using this but how can u edit if with its own timer coz atm its using the tuttime but that dont work when i put this with commands any ideas chaps
Quote:

if(strcmp(cmd, "/jobhelp", true) == 0)
{
if(PlayerInfo[playerid][pJob] != 1
{
if(TutTime >= 1)
{
TutTime += 1;
if(TutTime == 3)
{
SendClientMessage(i, COLOR_GREEN, "Welcome to the harvister job.");
SendClientMessage(i, COLOR_YELLOW, "Head over to the barn and hop into one of there Harvisters .");
SendClientMessage(i, COLOR_YELLOW, "Type /harvest to activate the harvest job .");
}
else if(TutTime == 6)
{
SendClientMessage(i, COLOR_GREEN, "Head threw the Markers to havest the feilds without killing yourselve.");
SendClientMessage(i, COLOR_YELLOW, "Then drop your load at this shed and receve your payment .");
SendClientMessage(i, COLOR_YELLOW, "You will need to wait 30 miniutes before you can harvest again .");
}
return 1;
}
}
}

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)