UsePlayerPedAnims
#1

Hello under OnGameModeInit i added this cos i want girl skins to run like woman and male skins to run using ped anims but its under GameMode init so it dosnt define playerid

Код:
public OnGameModeInit()
{
	if(PlayerInfo[playerid][pSex] == 1)
	{
    UsePlayerPedAnims(playerid, 1);
	}
	else if(PlayerInfo[playerid][pSex] == 2)
	{
    UsePlayerPedAnims(playerid, 0);
	}
and i get this error:

Код:
error 017: undefined symbol "playerid"
error 017: undefined symbol "playerid"
error 017: undefined symbol "playerid"
error 017: undefined symbol "playerid"
and when i change "playerid" to "i"

i still get error but like this:

Код:
error 017: undefined symbol "i"
error 017: undefined symbol "i"
error 017: undefined symbol "i"
error 017: undefined symbol "i"
is there any chance of doing this ?? THx
Reply
#2

pawn Код:
public OnGameModeInit()
{
    UsePlayerPedAnims();
return 1;
}
there is no need for 'playerid'

if "public OnGameModeInit()" has no idea in it ("public OnGameModeInit(playerid)"); then player id is not defined!


PlayerInfo[playerid][pSex] shouldn't be on OnGameModeInit

because it's called when you starting/re-starting your game.

UsePlayerPedAnims(playerid, bool:toggle);
could be a good idea for 0.3
Reply
#3

without playerid in UsePlayerPedAnims it will change the type of running for everybody not just females and males so when a woman join everyone will run like a woman :/ and i showed 4 errors, there is a playerid in here too
Код:
if(PlayerInfo[playerid][pSex] == 1)
Reply
#4

it's not working in that way...
https://sampwiki.blast.hk/wiki/UsePlayerPedAnims
Reply
#5

yes i been on that page that where i found it but this isnt helping i tryed putting it in onplayerspawn.
Reply
#6

fucking god damn read!!!
Quote:
UsePlayerPedAnims
Uses standard player walking animation (animation of CJ).


Important note: Only works when placed under "OnGameModeInit"!

Reply
#7

Calm down.
Reply
#8

Код:
public OnGameModeInit()
{
	if(PlayerInfo[playerid][pSex] == 1)
	{
    UsePlayerPedAnims(playerid, 1);
	}
	else 
	{
    UsePlayerPedAnims();
	}
Reply
#9

@Reality King: there was really no need for this bump + your code is wrong, it won't compile.
Reply
#10

i noes lol :P i guess theres no way it will affect everyplayer?
instead he uses a diff way to do it ? i guess im not as good with pawno like you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)