1
mIRC/pawn Scripting / Re: [PAWN]Dini, dubd, dutils.. and...
« on: July 11, 2010, 08:12:29 pm »
The broken scripting functions are all known and dealt/being dealt with.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
if(strcmp("jail",cmdtext,true) == 0)
{
SetPlayerPos(playerid,390.6279,-507.9221,9.3956,0); // playerid, x, y, z, interior
SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to the jail!"); // playerid, color, message
return 1;
}
/* Add to the top of your gamemode */
forward AntiCheat(playerid);
/* Add to OnGameModeInit callback */
SetTimer("AntiCheat",60000,1);
/* Add anywhere in your script */
public AntiCheat(playerid)
{
for(new i = 0; i < 50; i++)
{
if(IsPlayerConnected(i))
{
new Float:hp,
Float:armour;
if(GetPlayerHealth(i,hp) > 75)
{
/* HP over 75, do your stuff here */
}
else if(GetPlayerArmour(i,armour) > 75)
{
/* Armour over 75, do your stuff here */
}
}
}
return 1;
}
new MyString[64];
MyString[0] = "Hello";
MyString[1] = "Kitty";
if(!strlen(cmd)) // Called if cmd is null
if(strlen(text[0]) == 0) // Called if text is null
Both work the same way.MyString[256] = "this is a test string";
MyInt = 1;
printf("this joins %s with %d\n",MyString,MyInt);