Posts: 207
Threads: 23
Joined: Feb 2008
alredy found them here and here
|
Posts: 1,331
Threads: 123
Joined: Jan 2008
Code: if(strcmp(cmd, "/Freeze", true) == 0)
{
if(IsPlayerAdmin(playerid))
{
new tmp[30];
tmp = strtok(cmdtext, idx);
new otherplayer = strval(tmp);
if(IsPlayerConnected(otherplayer))
{
SendClientMessage(otherplayer, 0xFFFF00AA, "You have been Frozen!, Go read the (./)Rules");
TogglePlayerControllable(otherplayer,0);
}
}
return 1;
}
meh
|
Posts: 442
Threads: 97
Joined: Apr 2008
how to put this script??
where??
|
Posts: 207
Threads: 23
Joined: Feb 2008
08-06-2008, 03:12 PM
(This post was last modified: 08-07-2008, 12:47 PM by Zipper)
Quote: link=topic=8713.msg134278#msg134278 date=1218018758]
how to put this script??
where??
search goddamn it. There have been hundreds of answers on that question. For more info go here and here
Edit:
Code: if(strcmp(cmd, "/unfreeze", true) == 0)
{
if (IsPlayerAdmin(playerid))
{
new tmp[30];
new giveplayerid;
new giveplayer[24];
new sendername[24];
new string[128];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, 0xB360FDFF, "USAGE: /unfreeze [playerid]");
SendClientMessage(playerid, 0xB360FDFF, "FUNCTION: Will unfreeze the specified player. ");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), " You have been unfrozen by Administrator %s ", sendername);
SendClientMessage(giveplayerid,0x38FF06FF, string);
format(string, sizeof(string), " You have successfully unfrozen %s ", giveplayer);
SendClientMessage(playerid,0x33AA33AA, string);
TogglePlayerControllable(giveplayerid,1);
}
else if(giveplayerid == INVALID_PLAYER_ID)
{
format(string, sizeof(string), "%d is not an active player.", giveplayerid);
SendClientMessage(playerid,0xE60000FF, string);
}
}
else
{
SendClientMessage(playerid,0xE60000FF, "You are not an admin.");
}
return 1;
}
^^^^untested
|
Posts: 6,609
Threads: 788
Joined: Dec 2006
02-02-2009, 10:17 PM
(This post was last modified: 02-02-2009, 10:20 PM by Jay)
Meh, was bored before so I whipped up this:
(02-02-2009, 06:04 PM)Jay_ link Wrote: GivePlayerSpawnWeapon
This is a useful function that a lot of people often request. It gives a player a spawn weapon.
Put this above OnGameModeInit:
Code: static stock iPlayerSpawnWeapon[MAX_PLAYERS][50];
And put this at the bottom of your code:
Code: stock GivePlayerSpawnWeapon(iPlayerID,iWeaponID,iAmmo)
{
// Is the player connected?
if(!IsPlayerConnected(iPlayerID))
return false;
// Is the weapon ID valid?
if(iWeaponID < 1 || iWeaponID > 50)
return false;
// If a player already has this spawn weapon, just add the ammo.
if(iPlayerSpawnWeapon[iPlayerID][iWeaponID] > 0)
{
iPlayerSpawnWeapon[iPlayerID][iWeaponID] += iAmmo;
GivePlayerWeapon(iPlayerID,iWeaponID,iAmmo);
return 1;
}
iPlayerSpawnWeapon[iPlayerID][iWeaponID] = iAmmo;
GivePlayerWeapon(iPlayerID,iWeaponID,iAmmo);
return true;
}
Now, under OnPlayerSpawn, add this:
Code: for(new iWeaponID; iWeaponID < 50; iWeaponID++)
{
if(iPlayerSpawnWeapon[playerid][iWeaponID] > 0)
GivePlayerWeapon(playerid,iWeaponID,iPlayerSpawnWeapon[playerid][iWeaponID]);
}
Jay
I know Raymond was after something like this..
|
Posts: 5,240
Threads: 361
Joined: Jun 2008
Wow thanks I've been looking for that a long time!
|
Posts: 4
Threads: 1
Joined: Dec 2008
02-15-2009, 11:42 PM
(This post was last modified: 02-15-2009, 11:44 PM by Someoneis)
Hey. I was wondering if anyone has got a admin vehicle filterscript. Like only admins can fly a hydra and hunter. And also, if i can give other people access to fly the admin vehicles by a command? And also, how to set up admin colours so when you log in, if your admin, it makes your colour red and if your mod, it makes your color blue?
|
Posts: 5,240
Threads: 361
Joined: Jun 2008
If you can't script admin cmd's, download one at the SA:MP forums.
|
Posts: 1,953
Threads: 103
Joined: Dec 2007
Quote:Matthias link=topic=8713.msg180730#msg180730 date=1234898985]
If you can't script admin cmd's, download one at the SA:MP forums.
Chances are that it won't be what he's really requesting.
@Someoneis, I doubt theres a script exactly what you're asking for but you should learn PAWN if you really want something that want, or you could pay someone but not reccomended.
|
|