SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Gamemode Scripts

Reply
 
Thread Tools Display Modes
Old 22/06/2014, 10:31 PM   #5001
EasyMan
Little Clucker
 
EasyMan's Avatar
 
Join Date: Oct 2011
Posts: 9
Reputation: 0
Default Re: PPC_Trucking V1

Any one know, how to add :



kilometres to that speedometer ?
__________________
Haters - only hate the things they can't have and the person they can't be...

EasyMan is offline   Reply With Quote
Old 23/06/2014, 11:37 AM   #5002
(ETR)Geto244
Big Clucker
 
Join Date: Nov 2011
Posts: 122
Reputation: 2
Default Re: PPC_Trucking V1

Quote:
Originally Posted by Naresh View Post
cAN any one help me ?
pawn Code:
Errors G:\ppc - Drug Dev Back Up\gamemodes\PPC_Trucking.pwn(939) : error 029: invalid expression, assumed zero
G:\ppc - Drug Dev Back Up\gamemodes\PPC_Trucking.pwn(939) : error 029: invalid expression, assumed zero
G:\ppc - Drug Dev Back Up\gamemodes\PPC_Trucking.pwn(939) : error 029: invalid expression, assumed zero
G:\ppc - Drug Dev Back Up\gamemodes\PPC_Trucking.pwn(939) : fatal error 107: too many error messages on one line

Code:
pawn Code:
// This callback gets called whenever a player uses the chat-box
public OnPlayerText(playerid, text[])
{
    new Name[MAX_PLAYER_NAME], Msg[128];

    // Block the player's text if he has been muted
    if (APlayerData[playerid][Muted] == true || APlayerData[playerid][LoggedIn] == false)
    {
        // Let the player know he's still muted
        SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}You are still muted");

        // Don't allow his text to be sent to the chatbox
        return 0;
    } else {
        GetPlayerName(playerid, Name, sizeof(Name));
        format(Msg,sizeof(Msg),"%s {FFFFFF}[%d]: {FFFFFF}%s", Name, playerid, text);
        SendClientMessageToAll(GetPlayerColor(playerid), Msg);
    }
      else (APlayerData[playerid][PlayerLevel] => 1)
      format(Msg,sizeof(Msg),"[TW]%s {FFFFFF}[%d]: {FFFFFF}%s", Name, playerid, text);
      SendClientMessageToAll(GetPlayerColor(playerid), Msg);
  return 0;
}

Line 939:
pawn Code:
else (APlayerData[playerid][PlayerLevel] => 1)
It sould work
Code:
// This callback gets called whenever a player uses the chat-box
public OnPlayerText(playerid, text[])
{
	new Name[MAX_PLAYER_NAME], Msg[128];

	// Block the player's text if he has been muted
	if (APlayerData[playerid][Muted] == true || APlayerData[playerid][LoggedIn] == false)
	{
        // Let the player know he's still muted
		SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}You are still muted");

        // Don't allow his text to be sent to the chatbox
		return 0;
	}
    else if(APlayerData[playerid][PlayerLevel] => 1)
	{
		format(Msg,sizeof(Msg),"[TW]%s {FFFFFF}[%d]: {FFFFFF}%s", Name, playerid, text);
		SendClientMessageToAll(GetPlayerColor(playerid), Msg);
	}
	else
	{
		GetPlayerName(playerid, Name, sizeof(Name));
		format(Msg,sizeof(Msg),"%s {FFFFFF}[%d]: {FFFFFF}%s", Name, playerid, text);
		SendClientMessageToAll(GetPlayerColor(playerid), Msg);
	}
	return 0;
}
You can not use else twice!! And if you got more than 1 line than these lines must be in { here }
(ETR)Geto244 is offline   Reply With Quote
Old 23/06/2014, 12:24 PM   #5003
Naresh
Huge Clucker
 
Naresh's Avatar
 
Join Date: May 2014
Location: India,Tamil nadu, Chennai
Posts: 477
Reputation: 27
Default Re: PPC_Trucking V1

ok ty i am new to scripting r u a Trucking Server onwer ? i play in all trucking servers never seen u tell ur onwer name and sever name ty for helping .
__________________
Thanks to Frag.gs and ev0lution For Hosting my server!
Thanks to All Who have helped me!
Naresh is offline   Reply With Quote
Old 23/06/2014, 12:51 PM   #5004
(ETR)Geto244
Big Clucker
 
Join Date: Nov 2011
Posts: 122
Reputation: 2
Default Re: PPC_Trucking V1

Quote:
Originally Posted by Naresh View Post
ok ty i am new to scripting r u a Trucking Server onwer ? i play in all trucking servers never seen u tell ur onwer name and sever name ty for helping .
I own a trucking server, but its in my language (estonian). And if you dont understand my language, than you cant join my server . I use the same gm, but i have chanced it about 85% allready. Registration and all is in ucp, and all data is saved to mysql. At the moment, i have removed all house and personal vehicle system, and im make-ing from scratch new house / vehicle system. I didnt like that vehicles where saved in house file. And now it will all go to mysql and you can buy / order vehicles in diler.
(ETR)Geto244 is offline   Reply With Quote
Old 23/06/2014, 03:28 PM   #5005
Naresh
Huge Clucker
 
Naresh's Avatar
 
Join Date: May 2014
Location: India,Tamil nadu, Chennai
Posts: 477
Reputation: 27
Default Re: PPC_Trucking V1

Nice any ways can u help me i want to add a new veh to convoy work.. ty
__________________
Thanks to Frag.gs and ev0lution For Hosting my server!
Thanks to All Who have helped me!
Naresh is offline   Reply With Quote
Old 24/06/2014, 04:53 PM   #5006
(ETR)Geto244
Big Clucker
 
Join Date: Nov 2011
Posts: 122
Reputation: 2
Default Re: PPC_Trucking V1

Quote:
Originally Posted by Naresh View Post
Nice any ways can u help me i want to add a new veh to convoy work.. ty
What you mean? You mean that you can drive whit other vehicles in convoy? I havent look it like that, but i think you need to add like there is defined vehicles in all convoy functions.
(ETR)Geto244 is offline   Reply With Quote
Old 28/06/2014, 06:09 AM   #5007
Naresh
Huge Clucker
 
Naresh's Avatar
 
Join Date: May 2014
Location: India,Tamil nadu, Chennai
Posts: 477
Reputation: 27
Default Re: PPC_Trucking V1

i have a new class Fire Fighter it gets speeding how to make as if it will not ? and the Job to fail timer is not working in it plz help. ty.
__________________
Thanks to Frag.gs and ev0lution For Hosting my server!
Thanks to All Who have helped me!
Naresh is offline   Reply With Quote
Old 28/06/2014, 08:13 AM   #5008
fredelfredel
Big Clucker
 
Join Date: May 2010
Location: Sibiu Romania
Posts: 81
Reputation: -1
Default Re: PPC_Trucking V1

Quote:
Originally Posted by iOxide View Post
pawn Code:
// On the top of your script add:
new Transport_Timer[MAX_PLAYERS];
new Timer_Count[MAX_PLAYERS];

//When player load their truck start the timer like:
Transport_Timer[playerid] = SetTimerEx("Counter", 1000, true, "d", playerid);

//Public functions
forward Counter(playerid);
public Counter(playerid)
{
    Timer_Count[playerid]++;
    return 1;
}

//When they unload their truck
new msg[128], minutes, seconds;
seconds = (Timer_Count[playerid] % 60);
minutes = (Timer_Count[playerid] - seconds) / 60;
format(msg, 128, "Truck driver %s transported %s from %s to %s. Total time: %i minutes and %i seconds", Name, Load, StartLoc, EndLoc, minutes, seconds);
SendClientMessageToAll(-1, msg);
Timer_Count[playerid] = -1;
KillTimer(Transport_Timer[playerid]);

//OnPlayerDisconnect
Timer_Count[playerid] = -1;
KillTimer(Transport_Timer[playerid]);

I know there are some other efficient ways too but this is what i can think of.
hmm if you can detail it
__________________
Rep for me if you like me, it help me alot
Rep+for me if i help you

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
fredelfredel is offline   Reply With Quote
Old 28/06/2014, 10:59 AM   #5009
iOxide
Huge Clucker
 
Join Date: Nov 2013
Location: Inside PAWNO
Posts: 386
Reputation: 16
Default Re: PPC_Trucking V1

Quote:
Originally Posted by fredelfredel View Post
hmm if you can detail it
Well, i made this for the guy who were asking. Its not a tutorial and if you want to know what does each functions do, use samp wiki.
iOxide is offline   Reply With Quote
Old 28/06/2014, 10:55 PM   #5010
ReD_DeVi
Banned
 
Join Date: Aug 2012
Location: In Bed Room
Posts: 522
Reputation: 34
Default Re: PPC_Trucking V1

Good game mode keep it up
ReD_DeVi is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Ajuda] PPC_TRUCKING ThiagoMK PortuguÍs/Portuguese 4 30/07/2013 06:44 PM
Fix id Bug in PPC_Trucking Geeboi_Mehdi Client Support 11 18/05/2013 09:02 PM
PPC_Trucking Baumann Scripting Help 1 07/12/2012 04:28 PM
PPC_Trucking Baumann Scripting Help 1 02/12/2012 03:43 PM
PPC_Trucking help Private200 Scripting Help 1 16/11/2012 09:23 AM


All times are GMT. The time now is 02:06 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.