20.11.2011, 16:39
I'm working on a new script and I have some very simple cmds in like /ak, /deagle, /chainsaw, etc.
Now I get in game and this is what happens:
![](/imageshack/img143/2338/samp010smo.png)
![](/imageshack/img546/8342/samp011uv.png)
this is the script part:
None of these work and there is no errors in pawno.
Now I get in game and this is what happens:
![](/imageshack/img143/2338/samp010smo.png)
![](/imageshack/img546/8342/samp011uv.png)
this is the script part:
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/ak", cmdtext, true, 10) == 0) { GivePlayerWeapon(playerid,30,10000); return 1; } if (strcmp("/m4", cmdtext, true, 10) == 0) { GivePlayerWeapon(playerid,31,10000); return 1; } if (strcmp("/deagle", cmdtext, true, 10) == 0) { GivePlayerWeapon(playerid,24,10000); return 1; } if (strcmp("/spas", cmdtext, true, 10) == 0) { GivePlayerWeapon(playerid,27,10000); return 1; } if (strcmp("/chainsaw", cmdtext, true, 10) == 0) { GivePlayerWeapon(playerid,9,1); return 1; } if (strcmp("/kill", cmdtext, true, 10) == 0) { SetPlayerHealth(playerid, 0); return 1; } if (strcmp("/sniper", cmdtext, true, 10) == 0) { GivePlayerWeapon(playerid,34,10000); return 1; } if (strcmp("/abcdefghijklmnopqrstuvwxyz", cmdtext, true, 10) == 0) { GivePlayerWeapon(playerid,38,10000); return 1; } if (strcmp("/airportdm", cmdtext, true, 10) == 0) { SetPlayerPos(playerid,1921.8000488281,-2292.6999511719,15); return 1; } if (strcmp("/9mm", cmdtext, true, 10) == 0) { GivePlayerWeapon(playerid,22,10000); return 1; } if (strcmp("/shotty", cmdtext, true, 10) == 0) { GivePlayerWeapon(playerid,25,10000); return 1; } if (strcmp("/mp5", cmdtext, true, 10) == 0) { GivePlayerWeapon(playerid,29,10000); return 1; } if (strcmp("/rifle", cmdtext, true, 10) == 0) { GivePlayerWeapon(playerid,33,10000); return 1; } return 0; }