help -
SpiderWalk - 16.04.2011
I have problem where to add this
Код:
CMD:aweaps(playerid, params[])
{
if(gPlayerInfo[playerid][AdminLevel] >= 1) //if the person is level 1 or over it will work
{
GivePlayerWeapon(playerid,31,99999);//guns all the way down
GivePlayerWeapon(playerid,16,99999);
GivePlayerWeapon(playerid,34,99999);
GivePlayerWeapon(playerid,28,99999);
GivePlayerWeapon(playerid,38,99999);
GivePlayerWeapon(playerid,24,99999);
GivePlayerWeapon(playerid,26,99999);
GivePlayerWeapon(playerid,42,99999);
GivePlayerWeapon(playerid,14,99999);
GivePlayerWeapon(playerid,46,99999);
GivePlayerWeapon(playerid,9,99999);
}
else return 0;//for this i put else return 0; because if the player is not admin, make it like else return 0; so the cmd wont work. if you want something else, do "else return SendClientMessage(playerid,0xFF0000FF,"Fuck off, your not admin");
return 1; // the cmd will work for admins level 1 or over
}
Re: help -
Stigg - 16.04.2011
With your other commands.
BTW. Way to much ammo.
https://sampwiki.blast.hk/wiki/GivePlayerWeapon
Re: help -
Seven_of_Nine - 16.04.2011
on the bottom of your script.
or
not in publics.
Re: help -
davelord - 16.04.2011
under the "onplayercommand"
Re: help -
SpiderWalk - 16.04.2011
You mean on playercommandtext?
Re: help -
SpiderWalk - 16.04.2011
Help this errors is in
Код:
C:\Documents and Settings\Korisnik\Desktop\G.R.P\filterscripts\test22222.pwn(91) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Korisnik\Desktop\G.R.P\filterscripts\test22222.pwn(91) : error 017: undefined symbol "cmd_aweaps"
C:\Documents and Settings\Korisnik\Desktop\G.R.P\filterscripts\test22222.pwn(91) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Korisnik\Desktop\G.R.P\filterscripts\test22222.pwn(91) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Re: help -
SpiderWalk - 16.04.2011
You mean on playercommandtext?
Re: help -
SpiderWalk - 16.04.2011
This is my filter script
Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
#include <zcmd>
#include <dini>
#include <dutils>
enum pInfo {
AdminLevel
}
new gPlayerInfo[MAX_PLAYERS][pInfo];
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
#endif
public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
public OnVehicleSpawn(vehicleid)
{
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
CMD:aweaps(playerid, params[])
{
if(gPlayerInfo[playerid][AdminLevel] >= 1); //if the person is level 1 or over it will work
{
GivePlayerWeapon(playerid,31,9999);//guns all the way down
GivePlayerWeapon(playerid,16,9999);
GivePlayerWeapon(playerid,34,9999);
GivePlayerWeapon(playerid,28,9999);
GivePlayerWeapon(playerid,38,9999);
GivePlayerWeapon(playerid,24,9999);
GivePlayerWeapon(playerid,26,9999);
GivePlayerWeapon(playerid,42,9999);
GivePlayerWeapon(playerid,14,9999);
GivePlayerWeapon(playerid,46,9999);
GivePlayerWeapon(playerid,19,9999);
}
else return 0;//for this i put else return 0; because if the player is not admin, make it like else return 0; so the cmd wont work. if you want something else, do "else return SendClientMessage(playerid,0xFF0000FF,"Fuck off, your not admin");
return 1; // the cmd will work for admins level 1 or over
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveCheckpoint(playerid)
{
return 1;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveRaceCheckpoint(playerid)
{
return 1;
}
public OnRconCommand(cmd[])
{
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
return 1;
}
public OnObjectMoved(objectid)
{
return 1;
}
public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}
public OnVehicleMod(playerid, vehicleid, componentid)
{
return 1;
}
public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
return 1;
}
public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
return 1;
}
public OnPlayerExitedMenu(playerid)
{
return 1;
}
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
return 1;
}
public OnRconLoginAttempt(ip[], password[], success)
{
return 1;
}
public OnPlayerUpdate(playerid)
{
return 1;
}
public OnPlayerStreamIn(playerid, forplayerid)
{
return 1;
}
public OnPlayerStreamOut(playerid, forplayerid)
{
return 1;
}
public OnVehicleStreamIn(vehicleid, forplayerid)
{
return 1;
}
public OnVehicleStreamOut(vehicleid, forplayerid)
{
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}
Re: help -
park4bmx - 16.04.2011
no dont put it under
playercommandtext or
OnPlayerCOmamnd
Quote:
Originally Posted by Seven_of_Nine
on the bottom of your script.
or not in publics. ![Cheesy](images/smilies/biggrin.png)
|
EDIT try this
(UnTested)
pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
#include <zcmd>
#include <dini>
#include <dutils>
enum pInfo {
AdminLevel
}
new gPlayerInfo[MAX_PLAYERS][pInfo];
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
#endif
public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
public OnVehicleSpawn(vehicleid)
{
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
CMD:aweaps(playerid, params[])
{
if(gPlayerInfo[playerid][AdminLevel] >= 1); //if the person is level 1 or over it will work
{
GivePlayerWeapon(playerid,31,9999);//guns all the way down
GivePlayerWeapon(playerid,16,9999);
GivePlayerWeapon(playerid,34,9999);
GivePlayerWeapon(playerid,28,9999);
GivePlayerWeapon(playerid,38,9999);
GivePlayerWeapon(playerid,24,9999);
GivePlayerWeapon(playerid,26,9999);
GivePlayerWeapon(playerid,42,9999);
GivePlayerWeapon(playerid,14,9999);
GivePlayerWeapon(playerid,46,9999);
GivePlayerWeapon(playerid,19,9999);
}
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveCheckpoint(playerid)
{
return 1;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveRaceCheckpoint(playerid)
{
return 1;
}
public OnRconCommand(cmd[])
{
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
return 1;
}
public OnObjectMoved(objectid)
{
return 1;
}
public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}
public OnVehicleMod(playerid, vehicleid, componentid)
{
return 1;
}
public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
return 1;
}
public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
return 1;
}
public OnPlayerExitedMenu(playerid)
{
return 1;
}
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
return 1;
}
public OnRconLoginAttempt(ip[], password[], success)
{
return 1;
}
public OnPlayerUpdate(playerid)
{
return 1;
}
public OnPlayerStreamIn(playerid, forplayerid)
{
return 1;
}
public OnPlayerStreamOut(playerid, forplayerid)
{
return 1;
}
public OnVehicleStreamIn(vehicleid, forplayerid)
{
return 1;
}
public OnVehicleStreamOut(vehicleid, forplayerid)
{
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}
Re: help -
SpiderWalk - 16.04.2011
Can you explain me i am new with this Admin script but i am trying to learn it!