21.11.2010, 22:18
Hi guys im trying to make my own gun store and I got it to work so far, except the part where the person actually types for example:
/buygun deagle
Also when I compile I get these 4 errors:
I am making my own gamemode in case anyone wants to know which gamemode I am using to help me out.
The Command I Put:
/buygun deagle
Also when I compile I get these 4 errors:
Код:
C:\Users\SoSu\Desktop\SAMP Server\gamemodes\roleplaytraining.pwn(331) : warning 211: possibly unintended assignment C:\Users\SoSu\Desktop\SAMP Server\gamemodes\roleplaytraining.pwn(331) : error 046: unknown array size (variable "cmdtext") C:\Users\SoSu\Desktop\SAMP Server\gamemodes\roleplaytraining.pwn(331) : warning 215: expression has no effect C:\Users\SoSu\Desktop\SAMP Server\gamemodes\roleplaytraining.pwn(331) : error 001: expected token: ";", but found ")" C:\Users\SoSu\Desktop\SAMP Server\gamemodes\roleplaytraining.pwn(331) : error 029: invalid expression, assumed zero C:\Users\SoSu\Desktop\SAMP Server\gamemodes\roleplaytraining.pwn(331) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
The Command I Put:
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/buygun", cmdtext, true, 6) == 0) { if(IsPlayerInRangeOfPoint(playerid,1,308.0848,-141.4177,999.6016)) { SendClientMessage(playerid, COLOR_BLUE, "------Ammunation------"); SendClientMessage(playerid, COLOR_WHITE, "Deagle - $2500"); SendClientMessage(playerid, COLOR_WHITE, "Shotgun - $1500"); SendClientMessage(playerid, COLOR_WHITE, "Colt45 - $1000"); SendClientMessage(playerid, COLOR_BLUE, "--Legalized Gun Shop--"); { if(cmdtext = "Deagle") { GetPlayerMoney(playerid); GivePlayerMoney(playerid,-2500); GivePlayerWeapon(playerid, 24, 10); { else if(cmdtext = "Shotgun") { GetPlayerMoney(playerid); GivePlayerMoney(playerid,-1500); GivePlayerWeapon(playerid, 25, 15); { else if(cmdtext = "Colt45") { GetPlayerMoney(playerid); GivePlayerMoney(playerid,-1000); GivePlayerWeapon(playerid, 22, 50); } } } } return 1; }