Ayuda Con un comando
#1

Hola , tengo un pequeсo problema con un comando , me funciona bien , pero lo que quiero esque solo lo pueda utilizar en un sitio especifico aqui dejo las lineas y mas detalles

Quote:

esto va en OnPlayerCommandText

if(!strcmp(cmdtext, "/armarme", true))
{
if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1)
{
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 160);
SetPlayerArmour(playerid, 45.0);
} else {
SendClientMessage(playerid, 0xFF0000FF, "Tъ no eres policнa.");
}
return 1;
}

Como vemos ese comando a la faccion 1 al poner /armame le daria una eagle y chaleco , lo que quiero esque no se use en cualquier lugar si no en un lugar especifico.

Yo intente esto:

Quote:

if(!strcmp(cmdtext, "/armarme", true))
{
if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1)
{
if(!playertopoint(2.0, playerid, 2230.3579,-2286.2107,14.3751))
{
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 160);
SetPlayerArmour(playerid, 45.0);
} else {
SendClientMessage(playerid, 0xFF0000FF, "Tu no puedes usar eso.");
}
return 1;
}

Intente eso para que solo sep udiera en esa posicion pero me da error.

їAlguna solucion?
Reply
#2

Que error da?
Reply
#3

Quote:
Originally Posted by Nombre_Apellido
Que error da?
Quote:

C:\Documents and Settings\Administrator\Desktop\Server\gamemodes\Ga memode.pwn(2377) : error 004: function "SafeGivePlayerMoney" is not implemented
C:\Documents and Settings\Administrator\Desktop\Server\gamemodes\Ga memode.pwn(2406) : error 004: function "SafeGivePlayerMoney" is not implemented
C:\Documents and Settings\Administrator\Desktop\Server\gamemodes\Ga memode.pwn(2442) : error 004: function "SafeResetPlayerWeapons" is not implemented
C:\Documents and Settings\Administrator\Desktop\Server\gamemodes\Ga memode.pwn(2443) : error 004: function "SafeGivePlayerWeapon" is not implemented
C:\Documents and Settings\Administrator\Desktop\Server\gamemodes\Ga memode.pwn(2470) : error 004: function "SafeResetPlayerWeapons" is not implemented
C:\Documents and Settings\Administrator\Desktop\Server\gamemodes\Ga memode.pwn(2946) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Administrator\Desktop\Server\gamemodes\Ga memode.pwn(2949) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Administrator\Desktop\Server\gamemodes\Ga memode.pwn(2973) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Administrator\Desktop\Server\gamemodes\Ga memode.pwn(2985) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Administrator\Desktop\Server\gamemodes\Ga memode.pwn(2989) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Administrator\Desktop\Server\gamemodes\Ga memode.pwn(3001) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Administrator\Desktop\Server\gamemodes\Ga memode.pwn(3005) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Administrator\Desktop\Server\gamemodes\Ga memode.pwn(3009) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Administrator\Desktop\Server\gamemodes\Ga memode.pwn(3013) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Administrator\Desktop\Server\gamemodes\Ga memode.pwn(3017) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Administrator\Desktop\Server\gamemodes\Ga memode.pwn(3021) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Administrator\Desktop\Server\gamemodes\Ga memode.pwn(3025) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Administrator\Desktop\Server\gamemodes\Ga memode.pwn(3029) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Administrator\Desktop\Server\gamemodes\Ga memode.pwn(3040) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Administrator\Desktop\Server\gamemodes\Ga memode.pwn(3045) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Administrator\Desktop\Server\gamemodes\Ga memode.pwn(3050) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Administrator\Desktop\Server\gamemodes\Ga memode.pwn(3055) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Administrator\Desktop\Server\gamemodes\Ga memode.pwn(3060) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Administrator\Desktop\Server\gamemodes\Ga memode.pwn(3065) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Administrator\Desktop\Server\gamemodes\Ga memode.pwn(3086) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Administrator\Desktop\Server\gamemodes\Ga memode.pwn(3090) : error 004: function "PlayerToPoint" is not implemented

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


26 Errors.

Reply
#4

Quote:

if(!strcmp(cmdtext, "/armarme", true))
{
if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1)
{
if(!playertopoint(2.0, playerid, 2230.3579,-2286.2107,14.3751))
{
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 160);
SetPlayerArmour(playerid, 45.0);
}
}
else
{
SendClientMessage(playerid, 0xFF0000FF, "Tu no puedes usar eso.");
}
return 1;
}

Ordena tus cуdigos y te saldrбn mejor.
Reply
#5

Ahora me da 1 solo error

Quote:

C:\Documents and Settings\Administrator\Desktop\Server\gamemodes\Ga memode.pwn(15146) : error 017: undefined symbol "playertopoint"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

ї que puede ser ?
Reply
#6

[quote=Danis90 ]
Ahora me da 1 solo error

Quote:

C:\Documents and Settings\Administrator\Desktop\Server\gamemodes\Ga memode.pwn(15146) : error 017: undefined symbol "playertopoint"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

ї que puede ser ? , dice que no esta definido :S
Reply
#7

Es que tienes que poner asi PlayerToPoint

en vez de playertopoint

fijate si funciona ahora.
Reply
#8

Funcionaaaa Muchas gracias

Lo que es el panwo , un signo cambiado de posicion y unas mayusculas lo que puede liar jajaja
Reply
#9

Sн, asн que vigila con eso.
Siempre revisalo todo, y intenta arreglar tus errores.
Reply
#10

El caso esque ahora compila , pero deja usar el coamando en cualquier lugar

creo que es porque no le indica nada al poner el comando si no estas en el sitio , ejemplo: No estas en el lugar de armas

Buscare una solucion , o si teneis alguna idea.

salu2
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)