PDA

View Full Version : CJ Running style?


Toyotaspeed
10/11/2008, 08:13 PM
I've browsed the SAMP wiki,but I can't seem to find how to change the default SAMP running style to CJ's running style. I'd appreciate it if I got an answer. :D

matt2127
10/11/2008, 08:14 PM
UsePlayerPedAnims();

Please search harder next time.

Toyotaspeed
10/11/2008, 08:39 PM
Should I remove that or add it? If so,where should I put it?

matt2127
10/11/2008, 08:40 PM
Add that in OnGameModeInit

Toyotaspeed
11/11/2008, 12:33 AM
Add that in OnGameModeInit


Mmkay,so you can call me an epic scriptng nub.

What do you mean IN it? In the brackets (that doesn't work,btw. I get this error: C:\Users\Toyotaspeed\Documents\GTA\Sever\scriptfil es\Untitled.pwn(8) : error 025: function heading differs from prototype
C:\Users\Toyotaspeed\Documents\GTA\Sever\scriptfil es\Untitled.pwn(8) : error 029: invalid expression, assumed zero
C:\Users\Toyotaspeed\Documents\GTA\Sever\scriptfil es\Untitled.pwn(8) : error 001: expected token: ")", but found ";"
C:\Users\Toyotaspeed\Documents\GTA\Sever\scriptfil es\Untitled.pwn(8) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.

matt2127
11/11/2008, 12:38 AM
public OnGameModeInit()
{
UsePlayerPedAnims();
return 1;
}

Toyotaspeed
11/11/2008, 12:40 AM
I did this :

print("\n----------------------------------");
print(" Toyotaspeed Wars");
print("----------------------------------\n");
}
public OnGameModeInit()
{
UsePlayerPedAnims();
return 1;
}

But I ended up with this error when I tried to compile:

C:\Users\Toyotaspeed\Documents\GTA\Sever\scriptfil es\Untitled.pwn(13) : error 055: start of function body without function header
C:\Users\Toyotaspeed\Documents\GTA\Sever\scriptfil es\Untitled.pwn(15) : error 021: symbol already defined: "SetGameModeText"
C:\Users\Toyotaspeed\Documents\GTA\Sever\scriptfil es\Untitled.pwn(21) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.

Toyotaspeed
11/11/2008, 01:32 PM
Bump =/

Streetplaya
11/11/2008, 01:33 PM
there's already a OnGameModeInit in your script.
Put the UsePlayerPedAnims(); -Row into your old OnGameModeInit and delete the other one

Toyotaspeed
17/11/2008, 04:25 PM
Okay,I'm making myself look like an idiot -.-

This is basically the first part :

#include <a_samp>

main()
{
print("\n----------------------------------");
print(" Toyotaspeed Wars");
print("----------------------------------\n");
}

public OnGameModeInit()
{
UsePlayerPedAnims();
return true;
}
{
// Don't use these lines if it's a filterscript
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}

public OnGameModeExit()
{
return 1;
}

And I get this error:

C:\Users\Toyotaspeed\Documents\GTA\Sever\scriptfil es\TS.pwn(15) : error 055: start of function body without function header
C:\Users\Toyotaspeed\Documents\GTA\Sever\scriptfil es\TS.pwn(17) : error 021: symbol already defined: "SetGameModeText"
C:\Users\Toyotaspeed\Documents\GTA\Sever\scriptfil es\TS.pwn(19) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.

brett7
17/11/2008, 04:29 PM
wrong

public OnGameModeInit()
{
UsePlayerPedAnims();
return true;
}
{
// Don't use these lines if it's a filterscript
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}



right
public OnGameModeInit()
{
UsePlayerPedAnims();

// Don't use these lines if it's a filterscript
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}

i hoped i helped

lRaged
17/11/2008, 07:18 PM
It's already in the


#include <a_samp>


Right?

P.S.
I'm a PAWN nub. :3

Toyotaspeed
17/11/2008, 07:47 PM
@Brett17 - I think it finally compiled,but I got an error anyways

Script part :

#include <a_samp>


main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}


public OnGameModeInit()
{
UsePlayerPedAnims();

// Don't use these lines if it's a filterscript
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}

public OnGameModeExit()
{
return 1;
}

Error : C:\Users\Toyotaspeed\Documents\GTA\Sever\scriptfil es\TS.pwn(17) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.

domidom
17/11/2008, 07:52 PM
@Brett17 - I think it finally compiled,but I got an error anyways

Script part :

#include <a_samp>


main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}


public OnGameModeInit()
{
UsePlayerPedAnims();

// Don't use these lines if it's a filterscript
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}

public OnGameModeExit()
{
return 1;
}

Error : C:\Users\Toyotaspeed\Documents\GTA\Sever\scriptfil es\TS.pwn(17) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.



Thats a warning, im sure that when you actually start to learn the basics of pawn you will understand what indentation is.

LarzI
17/11/2008, 08:34 PM
Or just check out this topic:
http://forum.sa-mp.com/index.php?topic=61893.0

Toyotaspeed
18/11/2008, 12:37 AM
Keyword "Professional" :P

I'll browse the SAMP wiki again (for the 17th time) and try to learn something out of it before I go to anything big.


Why the hell do I not understand the wiki? Must be my IQ...=/

MenaceX^
18/11/2008, 04:35 AM
Didn't you success put this running style yet?

LarzI
18/11/2008, 05:21 AM
Keyword "Professional" :P


Soo? That means that you learn to indent like a pro, not if you're a pro, you gotta indent like this... ;)

Rozzie
18/11/2008, 05:48 AM
or read sticked topics: http://forum.sa-mp.com/index.php?topic=61893.0

(sorry if someone posted, didnt saw.

Toyotaspeed
19/11/2008, 02:10 AM
It's all a bunch of chinese to me :D

Thanks guys. I'll try to learn how to make multiple spawn points for one skin by myself now xD

biglittle
02/01/2011, 10:07 PM
just add this ad the OnGameModeInit

// Uses standard player walking animation (animation of CJ)
UsePlayerPedAnims();
//-------------------------------------------------------------------------------/

now he runs like when you play GTA San Andreas not online

Tomejus
02/01/2011, 10:13 PM
Okay,I'm making myself look like an idiot -.-

This is basically the first part :

#include <a_samp>

main()
{
print("\n----------------------------------");
print(" Toyotaspeed Wars");
print("----------------------------------\n");
}

public OnGameModeInit()
{
UsePlayerPedAnims();
return true;
}
{
// Don't use these lines if it's a filterscript
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}

public OnGameModeExit()
{
return 1;
}

And I get this error:

C:\Users\Toyotaspeed\Documents\GTA\Sever\scriptfil es\TS.pwn(15) : error 055: start of function body without function header
C:\Users\Toyotaspeed\Documents\GTA\Sever\scriptfil es\TS.pwn(17) : error 021: symbol already defined: "SetGameModeText"
C:\Users\Toyotaspeed\Documents\GTA\Sever\scriptfil es\TS.pwn(19) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.


Wtf is:

{
{

U should do this way:
public OnGameModeInit()
{
UsePlayerPedAnims();
// Don't use these lines if it's a filterscript
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}

Hudgens
02/01/2011, 10:14 PM
@Brett17 - I think it finally compiled,but I got an error anyways

Script part :

#include <a_samp>


main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}


public OnGameModeInit()
{
UsePlayerPedAnims();

// Don't use these lines if it's a filterscript
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}

public OnGameModeExit()
{
return 1;
}

Error : C:\Users\Toyotaspeed\Documents\GTA\Sever\scriptfil es\TS.pwn(17) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.


There, indentation means that your text isn't "clean" aka this is an example of bad indentation


public OnGameModeInit()
{
UsePlayerPedAnims();

// Don't use these lines if it's a filterscript
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}

See? The text is all messed up but what I quoted before that is a GOOD way of indentation. It wont bug your script, its ALL for easier reading.


EDIT:: Woaw I didn't see that the last post before the 2 other guys was in 2008. Guys, this bump wasn't necessary!

bartje01
02/01/2011, 10:15 PM
#include <a_samp>

main()
{
print("\n----------------------------------");
print(" Toyotaspeed Wars");
print("----------------------------------\n");
}

public OnGameModeInit()
{
UsePlayerPedAnims();
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}

public OnGameModeExit()
{
return 1;
}

leong124
03/01/2011, 01:16 AM
lol why someone bumped a topic of 2 years ago and there's some more people to solve the solved problem lmao?

Ryan Collin
03/07/2011, 09:19 PM
i FIXED IT, worked for me

Mean
03/07/2011, 09:39 PM
Great job on bumping a 6 month old topic. Hmm, what should I say...

[TZ_T]Pawan
16/10/2011, 04:22 AM
Dude Its Just Simple Adding A Line First Run Pawno AS Admininstrator Then Press Ctrl+f Then it will pop up a find box type there OnGameModeInIt then press enter it will find it then add the line on it
like :-
OnGameModeInIt()
{
UsePlayerPedAnims
return true;
}

Chriham3
20/07/2012, 11:14 PM
Here's a fix:


#include <a_samp>

main()
{
print("\n----------------------------------");
print(" Toyotaspeed Wars");
print("----------------------------------\n");
}

public OnGameModeInit()
{
UsePlayerPedAnims();
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}

public OnGameModeExit()
{
return 1;
}


EDIT: Sorry, I just realized I bumped a year old thread