SA-MP Forums Archive
Crash Problem! - 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)
+--- Thread: Crash Problem! (/showthread.php?tid=381516)



Crash Problem! - Akcent_Voltaj - 29.09.2012

why do i need to spam /crash to crash the person??

PHP код:
if(strcmp(cmd, "/crash", true) == 0)
                    {
                        if(
IsPlayerConnected(playerid))
                        {
                            
tmp = strtok(cmdtext, idx);
                            if(!
strlen(tmp))
                            {
                                
SendClientMessage(playerid, COLOR_GRAD2, "SYNTAX: /crash [playerid/PartOfName]");
                                return 
1;
                            }
                            
giveplayerid = ReturnUser(tmp);
                            
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                            if (
PlayerInfo[playerid][pAdmin] >= 1339)
                            {
                                if(
IsPlayerConnected(giveplayerid))
                                {
                                    if(
giveplayerid != INVALID_PLAYER_ID)
                                    {
                                         if(
giveplayerid == playerid) { SendClientMessage(playerid, COLOR_RED, " Nu-ti poti da Crash ! "); return 1; }
                                        
GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 1000, 0);
                                        
GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 2000, 1);
                                        
GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 3000, 2);
                                        
GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 4000, 3);
                                        
GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 5000, 4);
                                        
GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 6000, 5);
                                        
GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 7000, 6);
                                        
GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 8000, 7);
                                        
GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 9000, 8);
                                        
GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 10000, 9);
                                        
GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 11000, 10);
                                        
GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 12000, 11);
                                        
GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 13000, 12);
                                        
GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 14000, 13);
                                        
GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 15000, 14);
                                        
GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 16000, 15);
                                        
GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 17000, 16);
                                        
GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 18000, 17);
                                        
GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 19000, 18);
                                        
GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 20000, 19);
                                        
format(string, sizeof(string), "Ai dat crash lui %s (%d)'s game", giveplayer,giveplayerid);
                                          
SendClientMessage(playerid,COLOR_DBLUE, string);
                                        return 
1;
                                    }
                                    else
                                    {
                                        
format(string, sizeof(string), "** Unknown Player!", giveplayerid);
                                        
SendClientMessage(playerid, COLOR_GRAD1, string);
                                    }
                                }
                            }
                            else
                            {
                                
format(string, sizeof(string), "** You are not Authorised to Use this Command!", giveplayerid);
                                
SendClientMessage(playerid, COLOR_GRAD1, string);
                            }
                        }
                        return 
1;
                    } 



Re: Crash Problem! - Akcent_Voltaj - 30.09.2012

anyone know?


Re: Crash Problem! - Visio - 30.09.2012

Код:
if(strcmp(cmd, "/crash", true) == 0)
	{
		if(IsPlayerConnected(playerid))
		{
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
			    SendClientMessage(playerid, COLOR_GRAD2, "SYNTAX: /crash [playerid/PartOfName]");
			    return 1;
			}
			giveplayerid = ReturnUser(tmp);
			GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
			GetPlayerName(playerid, sendername, sizeof(sendername));
			if (PlayerInfo[playerid][pAdmin] >= 1337)
			{
			    if(IsPlayerConnected(giveplayerid))
			    {
			        if(giveplayerid != INVALID_PLAYER_ID)
			        {
			            if(giveplayerid != playerid && Untouchable[giveplayerid]) return SendClientMessage(playerid, COLOR_GREY, "* You Can't Do this on This player!");
						GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 1000, 0);
						GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 2000, 1);
						GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 3000, 2);
						GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 4000, 3);
						GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 5000, 4);
						GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 6000, 5);
						GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 7000, 6);
						format(string, sizeof(string), "You have crashed %s (%d)'s game", giveplayer,giveplayerid);
						format(string, 128, "AdmCmd: %s have crashed %s (%d)'s game.", sendername, giveplayer, giveplayerid);
						ABroadCast(COLOR_YELLOW,string,1);
				  		SendClientMessage(playerid,COLOR_DBLUE, string);
						return 1;
					}
					else
					{
					    format(string, sizeof(string), "** Unknown Player!", giveplayerid);
					    SendClientMessage(playerid, COLOR_GRAD1, string);
					}
				}
			}
			else
			{
			    format(string, sizeof(string), "** Nu esti autorizat sa folosesti aceasta comanda!", giveplayerid);
			    SendClientMessage(playerid, COLOR_GRAD1, string);
			}
		}
		return 1;
	}