SA-MP Forums Archive
help please. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: help please. (/showthread.php?tid=68108)



help please. - harly - 07.03.2009

Код:
dcmd_jail(playerid,params[])
{
if(gTeam[playerid] != TEAM_COP)
	return SendClientMessage(playerid,COLOR_RED,"LSPD only!");
new giveplayer = strval(params);
if (strlen(params)<=0)
	return SendClientMessage(playerid,COLOR_WHITE,"/jail [ID]");
if (!IsPlayerConnected(giveplayer))
	return SendClientMessage(playerid,COLOR_RED,"This player is not connected.");
else
{
new string[256],pidname[MAX_PLAYER_NAME],pname[MAX_PLAYER_NAME];
GetPlayerName(playerid,pidname,256);
GetPlayerName(giveplayer,pname,256);
format(string,sizeof(string),"Cop %s jailed you!",pidname);
SendClientMessage(giveplayer,COLOR_GREY,string);
format(string,sizeof(string),"You jailed %s!",pname);
SendClientMessage(playerid,COLOR_GREY,string);
SetPlayerPos(giveplayer,264.8447,77.5486,1001.0391);
SetPlayerInterior(giveplayer,6);
SetPlayerFacingAngle(giveplayer,266.6938);
ResetPlayerWeapons(giveplayer);
SetPlayerArmour(giveplayer,0.0);
SendClientMessage(giveplayer, COLOR_WHITE, "Your items where confiscated and destroyed!");
return true;
}
new pName[MAX_PLAYER_NAME];
new string[48];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "%s has joined the server.", pName);
SendClientMessageToAll(0xAAAAAAAA, string);
SetPlayerColor(playerid,COLOR_WHITE);
GivePlayerMoney(playerid,2000);
return 1;
}
Where should this be ^^
and this is OnPlayerCommandText
Код:
dcmd(jail,4,cmdtext);
Yes i have the #defines


Re: help please. - harly - 07.03.2009

help



Re: help please. - ICECOLDKILLAK8 - 07.03.2009

Whats the problem?


Re: help please. - harly - 07.03.2009

i get errors

Код:
C:\Program Files\Rockstar Games\GTA San Andreas\samp02Xserver.win32\gamemodes\gang chat.pwn(118) : error 017: undefined symbol "dcmd_jail"
C:\Program Files\Rockstar Games\GTA San Andreas\samp02Xserver.win32\gamemodes\gang chat.pwn(118) : error 029: invalid expression, assumed zero
C:\Program Files\Rockstar Games\GTA San Andreas\samp02Xserver.win32\gamemodes\gang chat.pwn(118) : error 029: invalid expression, assumed zero
C:\Program Files\Rockstar Games\GTA San Andreas\samp02Xserver.win32\gamemodes\gang chat.pwn(118) : 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 please. - harly - 07.03.2009

help ?



Re: help please. - harly - 07.03.2009

Can someone help my script is here

http://pastebin.com/m725e8292


Re: help please. - saiberfun - 07.03.2009

u forgot to put the dcmd in in OnPlayerCommandText


Re: help please. - ICECOLDKILLAK8 - 08.03.2009

Quote:
Originally Posted by saiberfun
u forgot to put the dcmd in in OnPlayerCommandText
Quote:
Originally Posted by harly
Where should this be ^^
and this is OnPlayerCommandText
Код:
dcmd(jail,4,cmdtext);
Yes i have the #defines
Read next time