if(strcmp(cmd, \"/vonszol\", true) == 0){ if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][szervLeader] == 2||PlayerInfo[playerid][szervTag] == 2 || PlayerInfo[playerid][szervLeader] == 1||PlayerInfo[playerid][szervTag] == 1 || PlayerInfo[playerid][szervLeader] == 3 || PlayerInfo[playerid][szervTag] == 3) { if(PlayerInfo[playerid][pRank] == 0) { SendClientMessage(playerid, COLOR_GRAD2,\"Ezzel a rangal nem vonszolhatsz senkit!\"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_LIGHTBLUE, \"StarLife RPG: /vonszol [JátékosID/NévRészlet]\"); return 1; } giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if (GetDistanceBetweenPlayers(playerid,giveplayerid) < 3) { if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GRAD2, \"Magadat nem tudod vonszolni!\"); return 1; } if(PlayerCuffed[giveplayerid] == 2) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(stringx, sizeof(stringx), \"%s elkezdett vonszolni.\", sendername); SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, stringx); format(stringx, sizeof(stringx), \"Vonszolod %s.\", rag(giveplayer,3)); SendClientMessage(playerid, COLOR_LIGHTBLUE, stringx); format(stringx, sizeof(stringx), \"* %s elkezdte vonszolni %s.\", sendername ,rag(giveplayer,3)); ProxDetector(30.0, playerid, stringx, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); PlayerInfo[playerid][vonszol] = 1; PlayerInfo[giveplayerid][vonszol] = 2+playerid; } else SendClientMessage(playerid, COLOR_GRAD2, \"A játékos nincs megbilincselve!\"); } else SendClientMessage(playerid, COLOR_GRAD2, \"A játékos nincs a közeledben!\"); } else SendClientMessage(playerid, COLOR_GRAD2, \"A játékos nem elérhető!\"); } } else SendClientMessage(playerid, COLOR_GRAD2, \"Nem vagy rendőr / navos / katona / T.E.K tag!\");} return 1;}
// mód elejérenew Vonszol[MAX_PLAYERS];new KiVonszolja[MAX_PLAYERS];// a vonszol parancshoz:Vonszol[giveplayerid] = 1;KiVonszolja[playerid] = giveplayerid;//Timert készítel.. vagy onplayerupdateif(Vonszol[playerid] == 1){for(new i = 0; i < MAX_PLAYERS; i++){if(Kivonszolja == playerid){ new Float:X, Float:Y, Float:Z; GetPlayerPos(i, X, Y, Z); SetPlayerPos(KiVonszolja, X+1, Y, Z);}}}
forward ProxDetector(Float:radi, playerid, str[], col1, col2, col3, col4, col5);public ProxDetector(Float:radi, playerid, str[],col1,col2,col3,col4,col5){ if(IsPlayerConnected(playerid)) { new Float:posx, Float:posy, Float:posz; new Float:oldposx, Float:oldposy, Float:oldposz; new Float:tempposx, Float:tempposy, Float:tempposz; GetPlayerPos(playerid, oldposx, oldposy, oldposz); //radi = 2.0; //Trigger Radius for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { GetPlayerPos(i, posx, posy, posz); tempposx = (oldposx -posx); tempposy = (oldposy -posy); tempposz = (oldposz -posz); //printf(\"DEBUG: X:%f Y:%f Z:%f\",posx,posy,posz); if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16))) { SendClientMessage(i, col1, str); } else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8))) { SendClientMessage(i, col2, str); } else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4))) { SendClientMessage(i, col3, str); } else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2))) { SendClientMessage(i, col4, str); } else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) { SendClientMessage(i, col5, str); } } } }//not connected return 1;}