08.08.2011, 19:25
Aca te los dejo:
aca un link con las teclas q puedes usar https://sampwiki.blast.hk/wiki/GetPlayerKeys (tene en cuenta q se detecta la funcion, no la tecla en si.
pawn Код:
//1
if(!strcmp(cmdtext, "/comando", true)){
new Float:P[3];
GetPlayerPos(playerid, P[0], P[1], P[2]);
for(new i; i<GetMaxPlayers(); i++){
if(IsPlayerConnected(i) && i != playerid && IsPlayerInRangeOfPoint(playerid, 5, P[0], P[1], P[2]))
SetPlayerHealth(playerid, 0);
}return 1;
}
//2
if(!strcmp(cmdtext, "/comando", true)){
new Float:P[3];
GetPlayerPos(playerid, P[0], P[1], P[2]);
for(new i; i<GetMaxPlayers(); i++){
if(IsPlayerConnected(i))
SetPlayerHealth(playerid, 0);
}return 1;
}
//3
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_FIRE)
if(IsPlayerInRangeOfPoint(playerid, distancia, X, Y, Z))
SetPlayerPos(playerid, X1, Y1, Z1);
return 1;
}