replace FCNPC by actor
#1

Replacing these three codes include pro FCNPC new way of actors?

Код:
if(FCNPC_GetSpecialAction(npcquetaroubando[i]) == SPECIAL_ACTION_HANDSUP) return SendClientMessage(playerid, COLOR_GREY, "Este NPC jб estб sendo roubado!");
Код:
FCNPC_SetSpecialAction(npcquetaroubando[i], SPECIAL_ACTION_HANDSUP);
Код:
FCNPC_SetSpecialAction(npcquetaroubando[playerid], SPECIAL_ACTION_NONE);
Reply
#2

BUMP
Reply
#3

Use ApplyActorAnimation to apply the handsup animation. Which one it is, i dont know.
Reply
#4

Quote:
Originally Posted by Richie©
Посмотреть сообщение
Which one it is, i dont know.
It is:

Код:
ApplyActorAnimation(actorid, "PED", "handsup", 4.1, 0, 0, 0, 0, 0);
Greekz
Reply
#5

WIth actors u can make it all, but idk how, sorry
Reply
#6

I needed:

Make sure it is doing the animation handsup
Make the animation handsup
And stop doing the animation handsup

Only that to be able to have a basic theft system
Reply
#7

PHP код:
stock strcpy(dest[], const source[], maxlength=sizeof dest)
{
    
strcat((dest[0] = EOSdest), sourcemaxlength);
}
new 
currentActorAnim[MAX_ACTORS][24];
stock ApplyActorAnimationEx(actoridlib[], anim[], Float:fDeltalooplockxlockyfreezetime)
{
    
strcpy(currentActorAnim[actorid], anim);
    return 
ApplyActorAnimation(actoridlibanimfDeltalooplockxlockyfreezetime);
}
#if defined _ALS_ApplyActorAnimation
    #undef ApplyActorAnimation
#else
    #define _ALS_ApplyActorAnimation
#endif
#define ApplyActorAnimation ApplyActorAnimationEx 
Usage:

PHP код:
if(!strcmp(currentActorAnim[npcquetaroubando[i]], "handsup")) return print("Change this to whatever code.."); 
and to apply anim:
PHP код:
ApplyActorAnimation(actorid"PED""handsup"4.100000); 
Reply
#8

Quote:
Originally Posted by Ahmad45123
Посмотреть сообщение
PHP код:
stock strcpy(dest[], const source[], maxlength=sizeof dest)
{
    
strcat((dest[0] = EOSdest), sourcemaxlength);
}
new 
currentActorAnim[MAX_ACTORS][24];
stock ApplyActorAnimationEx(actoridlib[], anim[], Float:fDeltalooplockxlockyfreezetime)
{
    
strcpy(currentActorAnim[actorid], anim);
    return 
ApplyActorAnimation(actoridlibanimfDeltalooplockxlockyfreezetime);
}
#if defined _ALS_ApplyActorAnimation
    #undef ApplyActorAnimation
#else
    #define _ALS_ApplyActorAnimation
#endif
#define ApplyActorAnimation ApplyActorAnimationEx 
Usage:

PHP код:
if(!strcmp(currentActorAnim[npcquetaroubando[i]], "handsup")) return print("Change this to whatever code.."); 
and to apply anim:
PHP код:
ApplyActorAnimation(actorid"PED""handsup"4.100000); 
why this erros on comments?
Код:
		// roubo de lojas com NPC
		new targetplayer = GetPlayerTargetPlayer(i);
		if(IsValidActor(targetplayer) && targetplayer != INVALID_PLAYER_ID)
		{
			if(IsACop(i)) return 0;
			if(rouboulojinha[i] == true) return SendClientMessage(i, COLOR_WHITE, "You stole a newly store! Must wait TWO MINUTES for theft.");
			if(assaltandolojinha[i] == false)
			{
				npcquetaroubando[i] = targetplayer;	
				if(!strcmp(currentActorAnim[npcquetaroubando[i]], "handsup")) return SendClientMessage(playerid, COLOR_GREY, "Este NPC jб estб sendo roubado!");	// error 017: undefined symbol "currentActorAnim"		
				ApplyActorAnimation(npcquetaroubando, "PED", "handsup", 4.1, 0, 0, 0, 0, 0);  //  error 035: argument type mismatch (argument 1)
				
				pertodonpc[i] = GetPlayerInterior(i);
				assaltandolojinha[i] = true;
				// crime
				wanted[i] += 1;
				//PlayerPlaySound(playerid, 100008, 0.0, 0.0, 0.0); // " OH NO MAN ! "
				PlayerPlaySound(i, 100013, 0.0, 0.0, 0.0); // " What Are You Doing?!
				SetTimerEx("AssaltandoLoja", 5000, 0, "i", i);
				ShowPlayerProgressBar(i, progresso[i]);
				TextDrawShowForPlayer(i, ProgressoTexto[i]);
			}
		}
Reply
#9

Quote:
Originally Posted by pdonald
Посмотреть сообщение
why this erros on comments?
Код:
		// roubo de lojas com NPC
		new targetplayer = GetPlayerTargetPlayer(i);
		if(IsValidActor(targetplayer) && targetplayer != INVALID_PLAYER_ID)
		{
			if(IsACop(i)) return 0;
			if(rouboulojinha[i] == true) return SendClientMessage(i, COLOR_WHITE, "You stole a newly store! Must wait TWO MINUTES for theft.");
			if(assaltandolojinha[i] == false)
			{
				npcquetaroubando[i] = targetplayer;	
				if(!strcmp(currentActorAnim[npcquetaroubando[i]], "handsup")) return SendClientMessage(playerid, COLOR_GREY, "Este NPC jб estб sendo roubado!");	// error 017: undefined symbol "currentActorAnim"		
				ApplyActorAnimation(npcquetaroubando, "PED", "handsup", 4.1, 0, 0, 0, 0, 0);  //  error 035: argument type mismatch (argument 1)
				
				pertodonpc[i] = GetPlayerInterior(i);
				assaltandolojinha[i] = true;
				// crime
				wanted[i] += 1;
				//PlayerPlaySound(playerid, 100008, 0.0, 0.0, 0.0); // " OH NO MAN ! "
				PlayerPlaySound(i, 100013, 0.0, 0.0, 0.0); // " What Are You Doing?!
				SetTimerEx("AssaltandoLoja", 5000, 0, "i", i);
				ShowPlayerProgressBar(i, progresso[i]);
				TextDrawShowForPlayer(i, ProgressoTexto[i]);
			}
		}
Make sure you have this code in the very top of your scripts but under the includes:
PHP код:
stock strcpy(dest[], const source[], maxlength=sizeof dest)
{
    
strcat((dest[0] = EOSdest), sourcemaxlength);
}
new 
currentActorAnim[MAX_ACTORS][24];
stock ApplyActorAnimationEx(actoridlib[], anim[], Float:fDeltalooplockxlockyfreezetime)
{
    
strcpy(currentActorAnim[actorid], anim);
    return 
ApplyActorAnimation(actoridlibanimfDeltalooplockxlockyfreezetime);
}
#if defined _ALS_ApplyActorAnimation
    #undef ApplyActorAnimation
#else
    #define _ALS_ApplyActorAnimation
#endif
#define ApplyActorAnimation ApplyActorAnimationEx 
Reply
#10

now only here
ApplyActorAnimation(npcquetaroubando, "PED", "handsup", 4.1, 0, 0, 0, 0, 0);

// error 035: argument type mismatch (argument 1)


other rep for u
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)