PDA

View Full Version : special_action


bogdan123
24/03/2011, 12:03 AM
salut in filmuletu asta: http://videa.hu/videok/kreativ/endrushun-hurdle-race-XvltNBp6ZMpgOsWB

cum a facut treaba cu matura? adica ca zboara cu matura
multumesc

xxmitsu
24/03/2011, 12:43 AM
Nu pare greu de reprodus. Presupun ca:

SetPlayerAttachedObject 1 matura si inca 1 obiectul acela cu particule.
ApplyAnimation sa stea in acea pozitie.
TogglePlayerControlable sa fie nemiscat
OnPlayerUpdate -> GetPlayerKeys - citirea tastelor pentru miscare si SetPlayerPos si/sau SetPlayerVelocity mutarea efectiva.

gabitzu4ever
24/03/2011, 06:43 AM
doamne ce lume nebuna ce mai inventeaza :))

bogdan123
30/03/2011, 10:23 AM
deci de cand am facut topicu asta caut modelu de matura si nu il gasesc , stie cineva si imi spune si mie id-u?

multumesc

si inca ceva , am fs asta: http://forum.sa-mp.com/showthread.php?t=133882 cum pot face daca sta cineva in caruta sa nu cada? ca asa eu daca incepm sa merg jucatoru care e in caruta ramane in urma si cada

Gavibro
30/03/2011, 11:10 AM
Ala e jetpack modat

bogdan123
30/03/2011, 08:39 PM
ca sa nu mai deschid alt topic am acest fs:
http://forum.sa-mp.com/showthread.php?t=244929

eu vreau sa il integrez in gamemod

deci am pus tot cum trebuie mai putin asta:

for(new i=0; i<MAX_PLAYERS; i++) {
StopAFK(i);
}

asta chiar nu inteleg unde trebuie sa il pun

Rock_Ro
30/03/2011, 09:07 PM
Sub

public OnGameModeExit()
{
for(new i=0; i<MAX_PLAYERS; i++) {
StopAFK(i);
}
}

bogdan123
02/04/2011, 06:37 AM
deci am reusit dar am o problema la stopafk am facut asa:
public StopAFK(playerid)
{
if(GetPVarInt(playerid, "AFKTime")) { DeletePVar(playerid, "AFKTime"); }
if (PlayerInfo[playerid][pMember] == 0 || PlayerInfo[playerid][pLeader] == 0) { SetPlayerColor(playerid,COLOR_WHITE); }
if (PlayerInfo[playerid][pMember] == 0 && EventDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 0 && EventDuty[playerid] == 1) { SetPlayerColor(playerid,COLOR_ORANGE); }
if (PlayerInfo[playerid][pMember] == 0 && AdminDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 0 && AdminDuty[playerid] == 1) { SetPlayerColor(playerid,0xF98AABFF); }
if (PlayerInfo[playerid][pMember] == 0 && HelperDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 0 && HelperDuty[playerid] == 1) { SetPlayerColor(playerid,0xF98AABFF); }
if (PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1) { SetPlayerColor(playerid,0x0000FFFF); }
if (PlayerInfo[playerid][pMember] == 1 && EventDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 1 && EventDuty[playerid] == 1) { SetPlayerColor(playerid,COLOR_ORANGE); }
if (PlayerInfo[playerid][pMember] == 1 && AdminDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 1 && AdminDuty[playerid] == 1) { SetPlayerColor(playerid,0xF98AABFF); }
if (PlayerInfo[playerid][pMember] == 1 && HelperDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 1 && HelperDuty[playerid] == 1) { SetPlayerColor(playerid,0xF98AABFF); }
if (PlayerInfo[playerid][pMember] == 1 && CopUndercover[playerid] == 1 || PlayerInfo[playerid][pLeader] == 1 && CopUndercover[playerid] == 1) { SetPlayerColor(playerid,COLOR_WHITE); }
if (PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2) { SetPlayerColor(playerid,0x0000FFFF); }
if (PlayerInfo[playerid][pMember] == 2 && EventDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 2 && EventDuty[playerid] == 1) { SetPlayerColor(playerid,COLOR_ORANGE); }
if (PlayerInfo[playerid][pMember] == 2 && AdminDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 2 && AdminDuty[playerid] == 1) { SetPlayerColor(playerid,0xF98AABFF); }
if (PlayerInfo[playerid][pMember] == 2 && HelperDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 2 && HelperDuty[playerid] == 1) { SetPlayerColor(playerid,0xF98AABFF); }
if (PlayerInfo[playerid][pMember] == 2 && CopUndercover[playerid] == 1 || PlayerInfo[playerid][pLeader] == 2 && CopUndercover[playerid] == 1) { SetPlayerColor(playerid,COLOR_WHITE); }
if (PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3) { SetPlayerColor(playerid,0x0000FFFF); }
if (PlayerInfo[playerid][pMember] == 3 && EventDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 3 && EventDuty[playerid] == 1) { SetPlayerColor(playerid,COLOR_ORANGE); }
if (PlayerInfo[playerid][pMember] == 3 && AdminDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 3 && AdminDuty[playerid] == 1) { SetPlayerColor(playerid,0xF98AABFF); }
if (PlayerInfo[playerid][pMember] == 3 && HelperDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 3 && HelperDuty[playerid] == 1) { SetPlayerColor(playerid,0xF98AABFF); }
if (PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4) { SetPlayerColor(playerid,0xFF9B9BFF); }
if (PlayerInfo[playerid][pMember] == 4 && EventDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 4 && EventDuty[playerid] == 1) { SetPlayerColor(playerid,COLOR_ORANGE); }
if (PlayerInfo[playerid][pMember] == 4 && AdminDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 4 && AdminDuty[playerid] == 1) { SetPlayerColor(playerid,0xF98AABFF); }
if (PlayerInfo[playerid][pMember] == 4 && HelperDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 4 && HelperDuty[playerid] == 1) { SetPlayerColor(playerid,0xF98AABFF); }
if (PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5) { SetPlayerColor(playerid,0xB90000FF); }
if (PlayerInfo[playerid][pMember] == 5 && EventDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 5 && EventDuty[playerid] == 1) { SetPlayerColor(playerid,COLOR_ORANGE); }
if (PlayerInfo[playerid][pMember] == 5 && AdminDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 5 && AdminDuty[playerid] == 1) { SetPlayerColor(playerid,0xF98AABFF); }
if (PlayerInfo[playerid][pMember] == 5 && HelperDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 5 && HelperDuty[playerid] == 1) { SetPlayerColor(playerid,0xF98AABFF); }
if (PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6) { SetPlayerColor(playerid,0x955F2296); }
if (PlayerInfo[playerid][pMember] == 6 && EventDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 6 && EventDuty[playerid] == 1) { SetPlayerColor(playerid,COLOR_ORANGE); }
if (PlayerInfo[playerid][pMember] == 6 && AdminDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 6 && AdminDuty[playerid] == 1) { SetPlayerColor(playerid,0xF98AABFF); }
if (PlayerInfo[playerid][pMember] == 6 && HelperDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 6 && HelperDuty[playerid] == 1) { SetPlayerColor(playerid,0xF98AABFF); }
if (PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pLeader] == 7) { SetPlayerColor(playerid,0x9ACD32FF); }
if (PlayerInfo[playerid][pMember] == 7 && EventDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 7 && EventDuty[playerid] == 1) { SetPlayerColor(playerid,COLOR_ORANGE); }
if (PlayerInfo[playerid][pMember] == 7 && AdminDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 7 && AdminDuty[playerid] == 1) { SetPlayerColor(playerid,0xF98AABFF); }
if (PlayerInfo[playerid][pMember] == 7 && HelperDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 7 && HelperDuty[playerid] == 1) { SetPlayerColor(playerid,0xF98AABFF); }
if (PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8) { SetPlayerColor(playerid,0x80808000); }
if (PlayerInfo[playerid][pMember] == 8 && EventDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 8 && EventDuty[playerid] == 1) { SetPlayerColor(playerid,COLOR_ORANGE); }
if (PlayerInfo[playerid][pMember] == 8 && AdminDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 8 && AdminDuty[playerid] == 1) { SetPlayerColor(playerid,0xF98AABFF); }
if (PlayerInfo[playerid][pMember] == 8 && HelperDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 8 && HelperDuty[playerid] == 1) { SetPlayerColor(playerid,0xF98AABFF); }
if (PlayerInfo[playerid][pMember] == 8 && HitmanUndercover[playerid] == 1 || PlayerInfo[playerid][pLeader] == 8 && HitmanUndercover[playerid] == 1) { SetPlayerColor(playerid,COLOR_WHITE); }
if (PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9) { SetPlayerColor(playerid,0xEFC6FFFF); }
if (PlayerInfo[playerid][pMember] == 9 && EventDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 9 && EventDuty[playerid] == 1) { SetPlayerColor(playerid,COLOR_ORANGE); }
if (PlayerInfo[playerid][pMember] == 9 && AdminDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 9 && AdminDuty[playerid] == 1) { SetPlayerColor(playerid,0xF98AABFF); }
if (PlayerInfo[playerid][pMember] == 9 && HelperDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 9 && HelperDuty[playerid] == 1) { SetPlayerColor(playerid,0xF98AABFF); }
if (PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10) { SetPlayerColor(playerid,0xFFFF00FF); }
if (PlayerInfo[playerid][pMember] == 10 && EventDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 10 && EventDuty[playerid] == 1) { SetPlayerColor(playerid,COLOR_ORANGE); }
if (PlayerInfo[playerid][pMember] == 10 && AdminDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 10 && AdminDuty[playerid] == 1) { SetPlayerColor(playerid,0xF98AABFF); }
if (PlayerInfo[playerid][pMember] == 10 && HelperDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 10 && HelperDuty[playerid] == 1) { SetPlayerColor(playerid,0xF98AABFF); }
if (PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11) { SetPlayerColor(playerid,0xBFEFFFFF); }
if (PlayerInfo[playerid][pMember] == 11 && EventDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 11 && EventDuty[playerid] == 1) { SetPlayerColor(playerid,COLOR_ORANGE); }
if (PlayerInfo[playerid][pMember] == 11 && AdminDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 11 && AdminDuty[playerid] == 1) { SetPlayerColor(playerid,0xF98AABFF); }
if (PlayerInfo[playerid][pMember] == 11 && HelperDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 11 && HelperDuty[playerid] == 1) { SetPlayerColor(playerid,0xF98AABFF); }
if (PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12) { SetPlayerColor(playerid,0x008000B5); }
if (PlayerInfo[playerid][pMember] == 12 && EventDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 12 && EventDuty[playerid] == 1) { SetPlayerColor(playerid,COLOR_ORANGE); }
if (PlayerInfo[playerid][pMember] == 12 && AdminDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 12 && AdminDuty[playerid] == 1) { SetPlayerColor(playerid,0xF98AABFF); }
if (PlayerInfo[playerid][pMember] == 12 && HelperDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 12 && HelperDuty[playerid] == 1) { SetPlayerColor(playerid,0xF98AABFF); }
if (PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13) { SetPlayerColor(playerid,0x40008087); }
if (PlayerInfo[playerid][pMember] == 13 && EventDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 13 && EventDuty[playerid] == 1) { SetPlayerColor(playerid,COLOR_ORANGE); }
if (PlayerInfo[playerid][pMember] == 13 && AdminDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 13 && AdminDuty[playerid] == 1) { SetPlayerColor(playerid,0xF98AABFF); }
if (PlayerInfo[playerid][pMember] == 13 && HelperDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 13 && HelperDuty[playerid] == 1) { SetPlayerColor(playerid,0xF98AABFF); }
if (PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14) { SetPlayerColor(playerid,0xFFD700FF); }
if (PlayerInfo[playerid][pMember] == 14 && EventDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 14 && EventDuty[playerid] == 1) { SetPlayerColor(playerid,COLOR_ORANGE); }
if (PlayerInfo[playerid][pMember] == 14 && AdminDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 14 && AdminDuty[playerid] == 1) { SetPlayerColor(playerid,0xF98AABFF); }
if (PlayerInfo[playerid][pMember] == 14 && HelperDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 14 && HelperDuty[playerid] == 1) { SetPlayerColor(playerid,0xF98AABFF); }
if (PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15) { SetPlayerColor(playerid,0x00F5FFFF); }
if (PlayerInfo[playerid][pMember] == 15 && EventDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 15 && EventDuty[playerid] == 1) { SetPlayerColor(playerid,COLOR_ORANGE); }
if (PlayerInfo[playerid][pMember] == 15 && AdminDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 15 && AdminDuty[playerid] == 1) { SetPlayerColor(playerid,0xF98AABFF); }
if (PlayerInfo[playerid][pMember] == 15 && HelperDuty[playerid] == 1 || PlayerInfo[playerid][pLeader] == 15 && HelperDuty[playerid] == 1) { SetPlayerColor(playerid,0xF98AABFF); }
return 1;
}

si la

public Check()
{
for(new i=0; i<MAX_PLAYERS; i++) {
if(!IsPlayerConnected(i)) continue;
new Float:x, Float:y, Float:z;
GetPlayerPos(i, x, y, z);

if(!GetPVarInt(i,"TabbedOut"))
{
if((GetTickCount() - GetPVarInt(i, "LastUpdate")) >= 5000) {
SetPVarInt(i, "TabbedOut", 1);
CallLocalFunction("StartAFK", "i", i);
}
if(x != 0) {
if(Pos[i][0] == x && Pos[i][1] == y && Pos[i][2] == z) {
SetPVarInt(i, "AFKTime", GetPVarInt(i, "AFKTime") + 1);
}
}

if(!(Pos[i][0] == x && Pos[i][1] == y && Pos[i][2] == z)) {
CallLocalFunction("StopAFK", "i", i);
}
}
if(GetPVarInt(i, "TabbedOut"))
{
SetPVarInt(i, "AFKTime", GetPVarInt(i, "AFKTime") + 1);
}

if(GetPVarInt(i, "AFKTime") == 300) {
CallLocalFunction("StartAFK", "i", i);
}

if(GetPVarInt(i, "AFKTime") >= MAX_AFKTIME*60)
{
if (WantedLevel[i]>0)
{
new string[70], name[24];
GetPlayerName(i, name, 24);
format(string, sizeof(string), "%s a primit kick ca a lasat afk cu wanted.", name);
SendClientMessageToAll(0xFFFFFFFF, string);
Kick(i);
}
}
GetPlayerPos(i, Pos[i][0], Pos[i][1], Pos[i][2]);
}
return 1;
}


daca scot de la stopafk

if(GetPVarInt(playerid, "AFKTime")) { DeletePVar(playerid, "AFKTime"); }

daca playeru sta 10 minute afk , cand revine daca primeste wanted ia direct kick

cu asta pusa la stopafk daca playeru sta 10 min afk , revine si ii dai wanted , el poate lasa afk ca nu primeste kick

cum fac sa ii dea kick? sau cum fac de fiecare data cand revine din afk sa se reseteze timpu AFKtime si cand lasa dinou afk , sa porneasca timpu dinou