PDA

View Full Version : /work


Narimalla
02/08/2012, 04:16 PM
Hi Guys

Im creating A trucking Server Im Not Able to Get the /work command for missions

SEnergy
02/08/2012, 04:36 PM
59. line, you're missing ";" at the end



now for real, what do you expect from us now? are you telling us that you cna't do something just to inform us or what?

HarlemSAMP
02/08/2012, 05:05 PM
Post your work cmd in order we can help you

Narimalla
03/08/2012, 01:02 PM
I want the /work command im not able to make it

Avi57
03/08/2012, 01:22 PM
Change x,y,z !
... Name of Place

//

#include <a_samp>
#include <float>


//Colors
#define COLOR_RED 0xFF0000AA
#define COLOR_GREEN 0x00FF00AA
#define COLOR_BLUE 0x0000FFAA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_ORANGE 0xFFA500AA
#define COLOR_MENU 0xADFF2FAA //Green/Yellow
#define COLOR_MENUHEADER 0x7CFC00AA
#define COLOR_AQUA 0x66CDAAAA

forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);

//news
#pragma tabsize 0

public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" work cmd");
print("--------------------------------------\n");
return 1;
}

public OnFilterScriptExit()
{
return 1;
}



public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp("/work", cmdtext, true))
{


SendClientMessage(playerid, 0xFFFF00AA,"You are delivering wastee from .. to ........");
SetPlayerCheckpoint(playerid, X, Y, Z, 10.0);
}

}
return 1;
}
return 0;
}

public OnPlayerEnterCheckpoint(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, X, Y, Z)){
GivePlayerMoney(playerid, 23123);
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_YELLOW, "You Delivered Waste From .... To ..");
new str[128],name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, 24); format(str, sizeof(str), "%s Has Delivered Waste From .......... To ......... ", name); SendClientMessageToAll(0xFFFF00AA, str);
return 1;
}

Narimalla
03/08/2012, 01:29 PM
Change x,y,z !
... Name of Place

//

#include <a_samp>
#include <float>


//Colors
#define COLOR_RED 0xFF0000AA
#define COLOR_GREEN 0x00FF00AA
#define COLOR_BLUE 0x0000FFAA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_ORANGE 0xFFA500AA
#define COLOR_MENU 0xADFF2FAA //Green/Yellow
#define COLOR_MENUHEADER 0x7CFC00AA
#define COLOR_AQUA 0x66CDAAAA

forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);

//news
#pragma tabsize 0

public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" work cmd");
print("--------------------------------------\n");
return 1;
}

public OnFilterScriptExit()
{
return 1;
}



public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp("/work", cmdtext, true))
{


SendClientMessage(playerid, 0xFFFF00AA,"You are delivering wastee from .. to ........");
SetPlayerCheckpoint(playerid, X, Y, Z, 10.0);
}

}
return 1;
}
return 0;
}

public OnPlayerEnterCheckpoint(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, X, Y, Z)){
GivePlayerMoney(playerid, 23123);
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_YELLOW, "You Delivered Waste From .... To ..");
new str[128],name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, 24); format(str, sizeof(str), "%s Has Delivered Waste From .......... To ......... ", name); SendClientMessageToAll(0xFFFF00AA, str);
return 1;
}

Im getting errors

C:\Documents and Settings\JSM\Desktop\Own server\gamemodes\trucking.pwn(122) : error 010: invalid function or declaration
C:\Documents and Settings\JSM\Desktop\Own server\gamemodes\trucking.pwn(124) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.

Devilxz97
03/08/2012, 01:36 PM
Im getting errors

C:\Documents and Settings\JSM\Desktop\Own server\gamemodes\trucking.pwn(122) : error 010: invalid function or declaration
C:\Documents and Settings\JSM\Desktop\Own server\gamemodes\trucking.pwn(124) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.

public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp("/work", cmdtext, true))
{

SendClientMessage(playerid, 0xFFFF00AA,"You are delivering wastee from .. to ........");
SetPlayerCheckpoint(playerid, X, Y, Z, 10.0);
return 1;
}
return 1;
}

Narimalla
03/08/2012, 01:48 PM
public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp("/work", cmdtext, true))
{

SendClientMessage(playerid, 0xFFFF00AA,"You are delivering wastee from .. to ........");
SetPlayerCheckpoint(playerid, X, Y, Z, 10.0);
return 1;
}
return 1;
}

Thanks +1Rep