Help in Scripting
#1

Guys, when I tried to create a command, and when I compile it, it doesn't show any errors, then when I play in the game, the command doesn't work. help me please
Reply
#2

what are you using? ZCMD? I recommend that if you are begginer scripter. also check out SSCANF by ******. Having those two, you are unstopable xd



using ZCMD -

pawn Код:
CMD:help(playerid,params[])
{
     SendClientMessage(playerid,YOURCOLORHERE,"Welcome To The Server. Please Follow This Rules:");
     SendClientMessage(playerid,YOURCOLORHERE,"No Cheating, Don't Rage At People ^.^");
     return 1;
}
using ZCMD+sscanf

pawn Код:
CMD:health(playerid,params[])
{
     new PID,pHealth,Msg[128];
     if(sscanf(params,"dd",PID,pHealth)) return SendClientMessage(playerid,YOURCOLORHERE,"USAGE: /Health < PlayerID > < Ammount >");

     if(!IsPlayerConnected(PID)) return SendClientMessage(playerid,YOURCOLORHERE,"That User Is Not Online"); // Sending message of an invalid player.

     new name[MAX_PLAYER_NAME];
     GetPlayerName(PID,name,sizeof(name));

     format(Msg,sizeof(Msg),"You have given %s ( %d ammount of health )",name,pHealth);
     SendClientMessage(playerid,YOURCOLORHERE,Msg);
     SetPlayerHealth(PID,pHealth);
     return 1;
}
}
LOL, sorry if i wrote something incorrect but im sleepy. cyall later. pce
Reply
#3

Where can I download those things, ZCMD and the other one.?
Reply
#4

Just search ZCMD in samp forums an same for sscanf
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)