Szerző Téma: Bilincs CMD formába  (Megtekintve 1299 alkalommal)

[ZzZ]Álmos

  • Vendég
Bilincs CMD formába
« Dátum: 2012. Február 16. - 17:39:28 »
0 Show voters
Sziasztok. Letudnátok nekem írni CMD formájában ha beírja valaki, hogy /bilincs <id> akkor lebilincseli (freezeli) a playert?

Nem elérhető nyE

  • 1745
    • Profil megtekintése
Bilincs CMD formába
« Válasz #1 Dátum: 2012. Február 16. - 19:14:25 »
0 Show voters
Ittvan kompletten egy rendõr munka script. Ebbõl kitudod venni.
http://sampforum.hu/index.php?topic=19273.msg208525#msg208525

[ZzZ]Álmos

  • Vendég
Bilincs CMD formába
« Válasz #2 Dátum: 2012. Február 16. - 20:03:07 »
0 Show voters
Idézetet írta: Antonyo date=1329416065\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"17129\" data-ipsquote-contentclass=\"forums_Topic
Ittvan kompletten egy rendõr munka script. Ebbõl kitudod venni.
http://sampforum.hu/index.php?topic=19273.msg208525#msg208525
 
De nekem csak egy bilincs CMD más nem. Ott nemtaláltam!

Nem elérhető CANNONN

  • 2139
    • Profil megtekintése
Bilincs CMD formába
« Válasz #3 Dátum: 2012. Február 16. - 21:08:17 »
0 Show voters
Szia! Tessék:
 

#include sscanf
#include zcmd
CMD:bilincs(playerid, params[])
{
new giveplayerid;
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if(sscanf(params, \"u\", giveplayerid)) return SendClientMessage(playerid, 0xFF0000AA, \"Használat: /bilincs [playerid]\");
if(giveplayerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000AA, \"Hiba: Nincs ilyen játékos!\");
if(!IsPlayerInRangeOfPoint(giveplayerid, 3.0, x,y,z)) return SendClientMessage(playerid, 0xFF0000AA, \"Hiba: A játékos nincs a közeledben\");
new name[MAX_PLAYER_NAME],string[200];
GetPlayerName(playerid, name, sizeof(name));
new illeto[MAX_PLAYER_NAME];
GetPlayerName(giveplayerid, illeto, sizeof(illeto));
format(string, sizeof string, \"{009dff}[Rendõr-%s] {2bff00}megbilincselte {ff9500}%s -t!\", name, illeto);
mehet[giveplayerid] = 1;
               if(IsPlayerLuxAdmin(playerid))
{
SendClientMessageToAll(0xFF0000AA,string);
TogglePlayerControllable(giveplayerid,0);
   ApplyAnimation(giveplayerid, \"PED\", \"cower\", 1, 1, 0, 0, 0, 0, 1);
}
else
{
                SendClientMessage(playerid, hiba, \"Nem vagy rendõr!\");
}
return 1;
}
CMD:levesz(playerid, params[])
{
new giveplayerid;
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if(sscanf(params, \"u\", giveplayerid)) return SendClientMessage(playerid, 0xFF0000AA, \"Használat: /levesz [playerid]\");
if(giveplayerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000AA, \"Hiba: Nincs ilyen játékos!\");
if(!IsPlayerInRangeOfPoint(giveplayerid, 3.0, x,y,z)) return SendClientMessage(playerid, 0xFF0000AA, \"Hiba: A játékos nincs a közeledben\");
new name[MAX_PLAYER_NAME],string[200];
GetPlayerName(playerid, name, sizeof(name));
new illeto[MAX_PLAYER_NAME];
GetPlayerName(giveplayerid, illeto, sizeof(illeto));
format(string, sizeof string, \"{009dff}[Rendõr-%s] {2bff00}levette a bilincset {ff9500}%s -ról/rõl!\", name, illeto);
                if(IsPlayerLuxAdmin(playerid))
{
SendClientMessageToAll(0xFF0000AA,string);
TogglePlayerControllable(giveplayerid,1);
        ClearAnimations(giveplayerid);
}
else
{
                SendClientMessage(playerid, hiba, \"Nem vagy rendõr!\");
}
return 1;
}

[ZzZ]Álmos

  • Vendég
Bilincs CMD formába
« Válasz #4 Dátum: 2012. Február 16. - 21:35:02 »
0 Show voters
Idézetet írta: Cannonn date=1329422897\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"17129\" data-ipsquote-contentclass=\"forums_Topic
Szia! Tessék:
 

#include sscanf
#include zcmd
CMD:bilincs(playerid, params[])
{
new giveplayerid;
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if(sscanf(params, \"u\", giveplayerid)) return SendClientMessage(playerid, 0xFF0000AA, \"Használat: /bilincs [playerid]\");
if(giveplayerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000AA, \"Hiba: Nincs ilyen játékos!\");
if(!IsPlayerInRangeOfPoint(giveplayerid, 3.0, x,y,z)) return SendClientMessage(playerid, 0xFF0000AA, \"Hiba: A játékos nincs a közeledben\");
new name[MAX_PLAYER_NAME],string[200];
GetPlayerName(playerid, name, sizeof(name));
new illeto[MAX_PLAYER_NAME];
GetPlayerName(giveplayerid, illeto, sizeof(illeto));
format(string, sizeof string, \"{009dff}[Rendõr-%s] {2bff00}megbilincselte {ff9500}%s -t!\", name, illeto);
mehet[giveplayerid] = 1;
               if(IsPlayerLuxAdmin(playerid))
{
SendClientMessageToAll(0xFF0000AA,string);
TogglePlayerControllable(giveplayerid,0);
   ApplyAnimation(giveplayerid, \"PED\", \"cower\", 1, 1, 0, 0, 0, 0, 1);
}
else
{
                SendClientMessage(playerid, hiba, \"Nem vagy rendõr!\");
}
return 1;
}
CMD:levesz(playerid, params[])
{
new giveplayerid;
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if(sscanf(params, \"u\", giveplayerid)) return SendClientMessage(playerid, 0xFF0000AA, \"Használat: /levesz [playerid]\");
if(giveplayerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000AA, \"Hiba: Nincs ilyen játékos!\");
if(!IsPlayerInRangeOfPoint(giveplayerid, 3.0, x,y,z)) return SendClientMessage(playerid, 0xFF0000AA, \"Hiba: A játékos nincs a közeledben\");
new name[MAX_PLAYER_NAME],string[200];
GetPlayerName(playerid, name, sizeof(name));
new illeto[MAX_PLAYER_NAME];
GetPlayerName(giveplayerid, illeto, sizeof(illeto));
format(string, sizeof string, \"{009dff}[Rendõr-%s] {2bff00}levette a bilincset {ff9500}%s -ról/rõl!\", name, illeto);
                if(IsPlayerLuxAdmin(playerid))
{
SendClientMessageToAll(0xFF0000AA,string);
TogglePlayerControllable(giveplayerid,1);
        ClearAnimations(giveplayerid);
}
else
{
                SendClientMessage(playerid, hiba, \"Nem vagy rendõr!\");
}
return 1;
}

 

Majd tesztelem köszi.

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal