SA-MP Forums Archive
Server Crash /taze - 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: Server Crash /taze (/showthread.php?tid=107329)



Server Crash /taze - Lajko1 - 09.11.2009

hello guys when i make and try my /taze command on my self it crash it and write error '' send error'' or ''dont send''

what should be wrong in this code ?

Код:
if(strcmp(cmd, "/taze", true) == 0)
	{
	tmp = strtok(cmdtext, idx);
	new playername[MAX_PLAYER_NAME];
	GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
	giveplayerid = strval(tmp);
	
	if(gTeam[playerid] == TEAM_COP || TEAM_SHERIFF || TEAM_FBI)
	if(!strlen(tmp))
	{
	SendClientMessage(playerid,0xFF0000AA, "USAGE: /Taze [Playerid] / [Player Name]");
	return 1;
	}
	if(!IsPlayerConnected(giveplayerid))
	{
	SendClientMessage(playerid,0xFF0000AA,"Invaild ID!");
	return 1;
	}
	//if(giveplayerid == playerid)
	//{
	//SendClientMessage(playerid, 0xFF0000AA, "You Can't Taze Your Self!");
	//return 1;
	//}
	if(GetPlayerWantedLevel(playerid) >= 4 || 5 || 6)
	{
	format(string, sizeof(string), "You Have Been Tazed by Officer %s[%d]!",playername,playerid);
	SendClientMessage(giveplayerid,0x33CCFFAA,string);
	
	format(string, sizeof(string), "You Tazed Suspect %s[%d]!",playername,giveplayerid);
	SendClientMessage(playerid,0x33CCFFAA,string);
	
	format(string, sizeof(string), "~r TAZED");
	GameTextForPlayer(giveplayerid,string,5000,5);
	
	printf("Suspect %s[%d] Has Been Tazed By Officer %s[%d]!",playername,giveplayerid,playername,playerid);
	}
	return 1;
	}
	return 0;
}
i hope you can help , ty for any help