Posts: 40
Threads: 10
Joined: Jul 2013
Reputation:
0
Hey Guys i want to make a team system but i am failing to make one i want to make a team named SWAT for Cops And Robbers which should not require any score or anything but it should be added only by admin if admin adds you to swat team than you can spawn as swat otherwise it gives you an error message You are not a Swat Member.
+rep in Advance Please I Need Help.
Posts: 539
Threads: 30
Joined: Feb 2015
Reputation:
0
I have a SWAT system too. But i disable the skin for players who are NOT a SWAT member.
Posts: 40
Threads: 10
Joined: Jul 2013
Reputation:
0
But how to make it i want help. Please
Posts: 40
Threads: 10
Joined: Jul 2013
Reputation:
0
Do you have skype please add me i can give you something in return.
skype: arshman.afzal
Posts: 1,266
Threads: 6
Joined: Oct 2014
Код:
new swat[MAX_PLAYERS];
public OnPlayerRequestSpawn(playerid) {
if(swat[playerid] == 0) {
if(GetPlayerSkin(playerid) == 285) { SendClientMessage(playerid,-1,"You Must Be A SWAT To Use This Skin"); return 0; }
}
return 1;
}
CMD:setswatpermission(playerid, params[])
{
if(IsPlayerAdmin(playerid)) {
if(isnull(params)) return SendClientMessage(playerid, -1, "USAGE: /setswatpermission [playerid]");
swat[playerid] = 1;
SendClientMessage(playerid,-1,"Swat permission seted.");
} else return SendClientMessage(playerid,-1,"ERROR: You need to be RCON to use this command");
return 1;
}
CMD:takeswatpermission(playerid, params[]) {
if(IsPlayerAdmin(playerid)) {
if(isnull(params)) return SendClientMessage(playerid, -1, "USAGE: /takeswatpermission [playerid]");
swat[playerid] = 0;
SendClientMessage(playerid,-1,"Swat permission taked.");
} else return SendClientMessage(playerid,-1,"ERROR: You need to be RCON to use this command");
return 1;
}
hope it work :d
FilterScript:
Код:
#include a_samp
#include zcmd
new swat[MAX_PLAYERS];
public OnPlayerRequestSpawn(playerid) {
if(swat[playerid] == 0) {
if(GetPlayerSkin(playerid) == 285) { SendClientMessage(playerid,-1,"You Must Be A SWAT To Use This Skin"); return 0; }
}
return 1;
}
CMD:setswatpermission(playerid, params[])
{
if(IsPlayerAdmin(playerid)) {
if(isnull(params)) return SendClientMessage(playerid, -1, "USAGE: /setswatpermission [playerid]");
swat[playerid] = 1;
SendClientMessage(playerid,-1,"Swat permission seted.");
} else return SendClientMessage(playerid,-1,"ERROR: You need to be RCON to use this command");
return 1;
}
CMD:takeswatpermission(playerid, params[]) {
if(IsPlayerAdmin(playerid)) {
if(isnull(params)) return SendClientMessage(playerid, -1, "USAGE: /takeswatpermission [playerid]");
swat[playerid] = 0;
SendClientMessage(playerid,-1,"Swat permission taked.");
} else return SendClientMessage(playerid,-1,"ERROR: You need to be RCON to use this command");
return 1;
}
Posts: 40
Threads: 10
Joined: Jul 2013
Reputation:
0
how will i send message to the player who has been added to swat?
i want to send him message.
---SWAT Leader Has Added You to SWAT---
======Congratulations=======
Posts: 1,266
Threads: 6
Joined: Oct 2014
old code have bug
the old will set ur own SWAT rank xD
take this:
Код:
#include a_samp
#include zcmd
new swat[MAX_PLAYERS];
public OnPlayerRequestSpawn(playerid) {
if(swat[playerid] == 0) {
if(GetPlayerSkin(playerid) == 285) { SendClientMessage(playerid,-1,"You Must Be A SWAT To Use This Skin"); return 0; }
}
return 1;
}
CMD:setswatpermission(playerid,params[]) {
if(IsPlayerAdmin(playerid)) {
if(isnull(params)) return SendClientMessage(playerid,-1,"USAGE: /setswatpermission [playerid]");
new player1;
if(!IsNumeric(params)) player1 = ReturnPlayerID(params);
else player1 = strval(params);
if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID && player1 != playerid) {
swat[player1] = 1;
SendClientMessage(playerid,-1,"Swat permission seted.");
SendClientMessage(player1,-1,"======Congratulations======= ");
SendClientMessage(player1,-1,"---SWAT Leader Has Added You to SWAT---");
} else return SendClientMessage(playerid, -1, "Player is not connected or is yourself");
} else return SendClientMessage(playerid,-1,"ERROR: You need to be RCON to use this command");
return 1;
}
CMD:takeswatpermission(playerid, params[]) {
if(IsPlayerAdmin(playerid)) {
if(isnull(params)) return SendClientMessage(playerid, -1, "USAGE: /takeswatpermission [playerid]");
new player1;
if(!IsNumeric(params)) player1 = ReturnPlayerID(params);
else player1 = strval(params);
if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID && player1 != playerid) {
swat[player1] = 0;
SendClientMessage(playerid,-1,"Swat permission taked.");
SendClientMessage(player1,-1,"---SWAT Leader Has Demoted Your SWAT Rank---");
} else return SendClientMessage(playerid, -1, "Player is not connected or is yourself");
} else return SendClientMessage(playerid,-1,"ERROR: You need to be RCON to use this command");
return 1;
}
stock IsNumeric(string[])
{
for (new i = 0, j = strlen(string); i < j; i++)
{
if (string[i] > '9' || string[i] < '0') return 0;
}
return 1;
}
stock pName(playerid)
{
new plname[MAX_PLAYER_NAME];
GetPlayerName(playerid, plname, sizeof(plname));
return plname;
}
stock ReturnPlayerID(PlayerName[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(strfind(pName(i),PlayerName,true)!=-1) return i;
}
}
return INVALID_PLAYER_ID;
}
Posts: 40
Threads: 10
Joined: Jul 2013
Reputation:
0
07.08.2015, 17:14
(
Последний раз редактировалось xXxThunderxXx; 07.08.2015 в 20:20.
)
How Can i save this rank on relog the rank gets removed and needs to be set again.on quitting the server the rank gets lost and needs to be set again Anyone Help PLease.
Posts: 40
Threads: 10
Joined: Jul 2013
Reputation:
0
Can You Please Help Me. i cant save this rank.
Posts: 436
Threads: 127
Joined: May 2014
Reputation:
0
****** has been released on 1998(16 years ago)why you do not use it?